Skip to content

Commit

Permalink
Fixed PHP 8.1 Deprecated Functionality error.
Browse files Browse the repository at this point in the history
explode(): Passing null to parameter #2 ($string) of type string is deprecated.
  • Loading branch information
tangar76 committed Apr 13, 2022
1 parent c1b411f commit 92e6dd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ public function isHeaderEnabled(ThemeInterface $theme = null)
$themeConfig = $this->themeCodeToConfigPath($theme);

$action = $this->_getRequest()->getFullActionName();
$exclude = explode("\n", $this->getConfigValue($themeConfig . self::PATH_HEADER_EXCLUDE));
$exclude = explode(
"\n",
$this->getConfigValue($themeConfig . self::PATH_HEADER_EXCLUDE) ?: ''
);
$exclude = array_map('trim', $exclude);

if (in_array($action, $exclude)) {
Expand Down

0 comments on commit 92e6dd3

Please sign in to comment.