Skip to content

Commit

Permalink
fix(import): check as boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed May 18, 2023
1 parent 4ed5e9b commit 0274d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin-name/backend/ImpExp.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function settings_import() {
// Retrieve the settings from the file and convert the json object to an array.
$settings_file = file_get_contents( $import_file );// phpcs:ignore

if ( !$settings_file ) {
if ( $settings_file !== false ) {
$settings = \json_decode( (string) $settings_file );

if ( \is_array( $settings ) ) {
Expand Down

0 comments on commit 0274d53

Please sign in to comment.