Skip to content

Commit

Permalink
Ensure that a PHP Compatibility report exists from WP Tide before att…
Browse files Browse the repository at this point in the history
…empting to use it, to avoid an undefined property warning.

Fixes #466
  • Loading branch information
Clorith committed Jul 25, 2024
1 parent eaff7b3 commit c50289a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function get_supported_php( $slug, $version ) {

$json = json_decode( $tide_response );

if ( empty( $json ) ) {
if ( empty( $json ) || ! isset( $json->reports->phpcs_phpcompatibilitywp->report->compatible ) ) {
$tide_versions = array();
} else {
$tide_versions = $json->reports->phpcs_phpcompatibilitywp->report->compatible;
Expand Down

0 comments on commit c50289a

Please sign in to comment.