Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Jan 22, 2025
1 parent 94f4894 commit 98b4e95
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _tests/managed_tests/tests/QITE2ETestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,19 @@ public function validate_and_normalize( string $file_path, ?callable $callback =
return $value;
},
'validate' => static function ( $value ) {
if ( empty( trim( $value ) ) ) {
if ( is_string( $value ) ) {
$value = trim( $value );
}

if ( empty( $value ) ) {
return true;
}

if ( is_array( $value ) ) {
$value = json_encode( $value );
}

return ( null !== json_decode( $value ) );
return ! is_null( json_decode( $value ) );
},
],
'debug_log' => [
Expand Down

0 comments on commit 98b4e95

Please sign in to comment.