Skip to content

Commit

Permalink
Merge pull request #493 from markjaquith/issue/array-offset-on-null
Browse files Browse the repository at this point in the history
Ensure that getZoneSetting() returns a value key before attempting to access it
  • Loading branch information
jacobbednarz authored Jul 11, 2022
2 parents 6f3f958 + 290aa76 commit 560ad18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WordPress/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ private function pageRuleContains($pagerules, $key, $value)
private function zoneSettingAlwaysUseHTTPSEnabled($zoneTag)
{
$settings = $this->api->getZoneSetting($zoneTag, "always_use_https");
return $settings["value"] == "on";
return !empty($settings["value"]) && $settings["value"] == "on";
}


Expand Down

0 comments on commit 560ad18

Please sign in to comment.