Skip to content

Commit

Permalink
Merge pull request #31 from rubenexp/bugfix/explode_null_deprecated
Browse files Browse the repository at this point in the history
[BUGFIX] - Deprecated Functionality: explode(): Passing null to param…
  • Loading branch information
experius-nl authored Apr 28, 2022
2 parents fe6c752 + e167aed commit 389bd71
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Observer/Controller/ActionPredispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,22 @@ public function __construct(
$this->resultFactory = $resultFactory;
}

private function isEnabled(){
return $this->scopeConfig->getValue('pagenotfound/general/enabled',\Magento\Store\Model\ScopeInterface::SCOPE_STORE);
private function isEnabled()
{
$configValue = $this->scopeConfig->getValue('pagenotfound/general/enabled',\Magento\Store\Model\ScopeInterface::SCOPE_STORE);
return $configValue ? explode(',',$configValue) : [];
}

private function includedParamsInRedirect(){
return explode(',',$this->scopeConfig->getValue('pagenotfound/general/included_params_redirect',\Magento\Store\Model\ScopeInterface::SCOPE_STORE));
private function includedParamsInRedirect()
{
$configValue = $this->scopeConfig->getValue('pagenotfound/general/included_params_redirect',\Magento\Store\Model\ScopeInterface::SCOPE_STORE);
return $configValue ? explode(',',$configValue) : [];
}

private function includedParamsInFromUrl(){
return explode(',',$this->scopeConfig->getValue('pagenotfound/general/included_params_from_url',\Magento\Store\Model\ScopeInterface::SCOPE_STORE));
private function includedParamsInFromUrl()
{
$configValue = $this->scopeConfig->getValue('pagenotfound/general/included_params_from_url',\Magento\Store\Model\ScopeInterface::SCOPE_STORE);
return $configValue ? explode(',',$configValue) : [];
}

public function execute(
Expand Down

0 comments on commit 389bd71

Please sign in to comment.