Skip to content

Commit

Permalink
Merge pull request #30 from therouv/fix-array-to-string-conversion
Browse files Browse the repository at this point in the history
Fix array to string conversion exception
  • Loading branch information
avstudnitz authored Nov 7, 2022
2 parents 9de7822 + 93b014d commit 800e11e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Plugin/ConfigFieldPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,23 @@ private function getScopeHint(Subject $field, $scopeType, $scope)
$path = $this->getPath($field);
$scopeLine = '';
if ($websiteId = $this->getWebsiteParam()) {
$currentValue = (string) $this->scopeConfig->getValue(
$currentValue = $this->scopeConfig->getValue(
$path,
ScopeInterface::SCOPE_WEBSITE,
$websiteId
);
} else {
$currentValue = (string) $this->scopeConfig->getValue($path);
$currentValue = $this->scopeConfig->getValue($path);
}
$scopeValue = (string) $this->scopeConfig->getValue($path, $scopeType, $scope->getId());

$scopeValue = $this->scopeConfig->getValue($path, $scopeType, $scope->getId());

if (is_array($currentValue) || is_array($scopeValue)) {
return $scopeLine;
}

$currentValue = (string) $currentValue;
$scopeValue = (string) $scopeValue;

if ($scopeValue != $currentValue) {
$scopeValue = $this->escaper->escapeHtml($scopeValue);

Expand Down

0 comments on commit 800e11e

Please sign in to comment.