File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,9 +81,9 @@ function gutenberg_experimental_global_styles_get_from_file( $file_path ) {
8181 true
8282 );
8383
84- $ json_decoding_error = json_last_error_msg ();
85- if ( ' No error ' !== $ json_decoding_error ) {
86- error_log ( 'Error when decoding file schema: ' . $ json_decoding_error );
84+ $ json_decoding_error = json_last_error ();
85+ if ( JSON_ERROR_NONE !== $ json_decoding_error ) {
86+ error_log ( 'Error when decoding file schema: ' . json_last_error_msg () );
8787 return $ config ;
8888 }
8989
@@ -105,9 +105,9 @@ function gutenberg_experimental_global_styles_get_user() {
105105 if ( array_key_exists ( 'post_content ' , $ user_cpt ) ) {
106106 $ decoded_data = json_decode ( $ user_cpt ['post_content ' ], true );
107107
108- $ json_decoding_error = json_last_error_msg ();
109- if ( ' No error ' !== $ json_decoding_error ) {
110- error_log ( 'Error when decoding user schema: ' . $ json_decoding_error );
108+ $ json_decoding_error = json_last_error ();
109+ if ( JSON_ERROR_NONE !== $ json_decoding_error ) {
110+ error_log ( 'Error when decoding user schema: ' . json_last_error_msg () );
111111 return $ config ;
112112 }
113113
You can’t perform that action at this time.
0 commit comments