From 67869c5d708406f901565d3eb15d9d7a25235d52 Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Tue, 23 Jan 2024 01:12:43 +0530 Subject: [PATCH] [WiP] Save current progress --- inc/class-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/class-api.php b/inc/class-api.php index 6675d85..7353183 100644 --- a/inc/class-api.php +++ b/inc/class-api.php @@ -390,7 +390,7 @@ public function images( \WP_REST_Request $request ) { * * @param array $data Response. * - * @return array|bool + * @return array|false */ private static function process_json_from_response( $data ) { // Find the target item. @@ -407,7 +407,7 @@ private static function process_json_from_response( $data ) { try { $json_object = json_decode( $json_string, true ); return $json_object; - } catch ( \Exception $e) { + } catch ( \Exception $e ) { // If parsing failed, try to find a JSON array in the string. preg_match( '/\[(.|\n)*\]/', $json_string, $matches );