Skip to content

Commit

Permalink
check for json_decode proper output
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffDusome committed Jul 19, 2023
1 parent df1d578 commit 8b99b37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion block-editor-custom-alignments.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ private function block_editor_custom_alignments_theme_json(): object {
return new \stdClass();
}

return json_decode( $theme_json );
$json_theme_json = json_decode( $theme_json );

if ( ! $json_theme_json ) {
return new \stdClass();
}

return $json_theme_json;
}

}
Expand Down

0 comments on commit 8b99b37

Please sign in to comment.