From f4935f1d33a839de1ab0bd8fe2554a9a4d1c9b46 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 4 Aug 2024 02:11:59 +0200 Subject: [PATCH] PhpUnit fix - 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 --- lib/Varien/Object.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Varien/Object.php b/lib/Varien/Object.php index bfd0f11bcff..0ddf7a65caa 100644 --- a/lib/Varien/Object.php +++ b/lib/Varien/Object.php @@ -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; }