This commit is contained in:
parent
a663c3914d
commit
884e450cad
@ -24,7 +24,7 @@ abstract class ReaderEntity extends Entity {
|
|||||||
*
|
*
|
||||||
* @return string|array
|
* @return string|array
|
||||||
*/
|
*/
|
||||||
public function conditional_json_decode(string $el): mixed {
|
public function conditional_json_decode(string $el) {
|
||||||
/** @var array $result */
|
/** @var array $result */
|
||||||
$result = json_decode($el);
|
$result = json_decode($el);
|
||||||
if (json_last_error() === JSON_ERROR_NONE) {
|
if (json_last_error() === JSON_ERROR_NONE) {
|
||||||
|
@ -79,7 +79,10 @@ class Hooks {
|
|||||||
$queryBuilder->executeStatement();
|
$queryBuilder->executeStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function isJson(mixed $string): bool {
|
/**
|
||||||
|
* @param mixed $string
|
||||||
|
*/
|
||||||
|
private static function isJson($string): bool {
|
||||||
return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE;
|
return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user