Skip to content

Commit

Permalink
PhpUnit fix
Browse files Browse the repository at this point in the history
 - PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/runner/work/magento-lts/magento-lts/lib/Varien/Object.php on line 594
  • Loading branch information
sreichel committed Aug 4, 2024
1 parent aa26cca commit f4935f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Varien/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public function toString($format = '')
} else {
preg_match_all('/\{\{([a-z0-9_]+)\}\}/is', $format, $matches);
foreach ($matches[1] as $var) {
$format = str_replace('{{' . $var . '}}', $this->getData($var), $format);
$format = str_replace('{{' . $var . '}}', (string) $this->getData($var), $format);
}
$str = $format;
}
Expand Down

0 comments on commit f4935f1

Please sign in to comment.