Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/controllers/FrmAddonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ protected static function fill_update_addon_info( $installed_addons ) {

$new_license = $addon->license;

if ( empty( $new_license ) || in_array( $new_license, $checked_licenses ) ) {
if ( empty( $new_license ) || in_array( $new_license, $checked_licenses, true ) ) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmEntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public static function manage_columns( $columns ) {

$action = FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );

if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ), true ) ) {
add_screen_option(
'per_page',
array(
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmFormActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private static function maybe_add_action_to_group( $action_controls, &$groups )
}

foreach ( $action_controls as $action ) {
if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) {
if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped, true ) ) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3353,7 +3353,7 @@ private static function get_unit( $unit ) {
}

foreach ( $units as $u => $strings ) {
if ( in_array( $unit, $strings ) ) {
if ( in_array( $unit, $strings, true ) ) {
return $u;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmEntriesListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ protected function get_primary_column_name() {
$primary_column = '';

foreach ( $columns as $column_key => $column_display_name ) {
if ( 'cb' !== $column_key && ! in_array( $column_key, $hidden ) ) {
if ( 'cb' !== $column_key && ! in_array( $column_key, $hidden, true ) ) {
$primary_column = $column_key;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions classes/helpers/FrmXMLHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ private static function maybe_add_required( &$f ) {
*/
private static function maybe_update_in_section_variable( &$in_section, &$f ) {
// If we're at the end of a section, switch $in_section is 0
if ( in_array( $f['type'], array( 'end_divider', 'break', 'form' ) ) ) {
if ( in_array( $f['type'], array( 'end_divider', 'break', 'form' ), true ) ) {
$in_section = 0;
}

Expand Down Expand Up @@ -2304,7 +2304,7 @@ private static function setup_new_notification( &$new_notification, $notificatio
foreach ( $add_fields as $add_field ) {
if ( isset( $notification[ $add_field ] ) ) {
$new_notification['post_content'][ $add_field ] = $notification[ $add_field ];
} elseif ( in_array( $add_field, array( 'plain_text', 'inc_user_info' ) ) ) {
} elseif ( in_array( $add_field, array( 'plain_text', 'inc_user_info' ), true ) ) {
$new_notification['post_content'][ $add_field ] = 0;
} else {
$new_notification['post_content'][ $add_field ] = '';
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public static function esc_order( $order_query ) {
$order = trim( reset( $order_query ) );
$safe_order = array( 'count(*)' );

if ( ! in_array( strtolower( $order ), $safe_order ) ) {
if ( ! in_array( strtolower( $order ), $safe_order, true ) ) {
$order = preg_replace( '/[^a-zA-Z0-9\-\_\.\+]/', '', $order );
}

Expand Down
8 changes: 4 additions & 4 deletions classes/models/FrmFormMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ protected function prepare_fields( $fields, &$form ) {

$this->prepare_field( $field, $new_field );

$in_section = ! empty( $this->current_section ) && ! in_array( $new_type, $this->fields_with_end() ) && $new_type !== 'break';
$in_section = ! empty( $this->current_section ) && ! in_array( $new_type, $this->fields_with_end(), true ) && $new_type !== 'break';

if ( $in_section ) {
$new_field['field_options']['in_section'] = $this->current_section['id'];
}

$form['fields'][] = $new_field;

if ( in_array( $new_type, $this->fields_with_end() ) ) {
if ( in_array( $new_type, $this->fields_with_end(), true ) ) {
$this->current_section = $field;
} elseif ( $new_type === 'break' || $new_type === 'end_divider' ) {
$this->current_section = array();
Expand Down Expand Up @@ -375,7 +375,7 @@ protected function maybe_add_end_fields( &$fields ) {
$type = $this->get_field_type( $field );
$new_type = $this->convert_field_type( $type, $field );

if ( ! in_array( $new_type, $with_end ) && $new_type !== 'break' ) {
if ( ! in_array( $new_type, $with_end, true ) && $new_type !== 'break' ) {
continue;
}

Expand All @@ -384,7 +384,7 @@ protected function maybe_add_end_fields( &$fields ) {
$open = array();
}

if ( in_array( $new_type, $with_end ) ) {
if ( in_array( $new_type, $with_end, true ) ) {
$open = $field;
}
}
Expand Down
4 changes: 2 additions & 2 deletions classes/views/frm-form-actions/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ul class="frm_actions_list">
<?php
foreach ( $action_controls as $action_control ) {
if ( in_array( $action_control->id_base, $displayed_actions ) || ! in_array( $action_control->id_base, $group['actions'] ) ) {
if ( in_array( $action_control->id_base, $displayed_actions, true ) || ! in_array( $action_control->id_base, $group['actions'], true ) ) {
continue;
}

Expand All @@ -49,7 +49,7 @@
}

foreach ( $group['actions'] as $action ) {
if ( in_array( $action, $displayed_actions ) ) {
if ( in_array( $action, $displayed_actions, true ) ) {
continue;
}
?>
Expand Down