Skip to content

Commit

Permalink
Check for key existence to ensure compabilitity wit PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Sep 16, 2024
1 parent 5026a02 commit 109a2e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected function sanitizeSettings(): void
*/
protected function setDefaultIntSetting(string $setting, int $value): void
{
if (empty($this->settings[$setting])) {
if (!array_key_exists($setting, $this->settings) || empty($this->settings[$setting])) {
$this->settings[$setting] = $value;
} else {
$this->settings[$setting] = (int) $this->settings[$setting];
Expand Down

0 comments on commit 109a2e0

Please sign in to comment.