| @@ -8,13 +8,8 @@ | ||
| 8 | 8 | * @param string $string |
| 9 | 9 | * @return bool |
| 10 | 10 | */ |
| 11 | 11 | public static function is_string_json( $string ) { |
| 12 | - | |
| 13 | - if ( ! is_string( $string ) || trim( $string ) === '' ) { | |
| 14 | - return false; | |
| 15 | - } | |
| 16 | - | |
| 17 | 12 | $decoded = json_decode( $string ); |
| 18 | 13 | |
| 19 | 14 | return is_object( $decoded ) || is_array( $decoded ); |
| 20 | 15 | } |