Skip to content

Commit b61b0d2

Browse files
committed
fix deprecated warning
str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
1 parent 688eecc commit b61b0d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Ajax/common/html/BaseHtml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* BaseHtml for HTML components
1313
*
1414
* @author jc
15-
* @version 1.3.2
15+
* @version 1.3.3
1616
*/
1717
abstract class BaseHtml extends BaseWidget {
1818
use BaseHtmlEventsTrait,BaseHtmlPropertiesTrait;
@@ -219,7 +219,7 @@ public function compile(JsUtils $js = NULL, &$view = NULL) {
219219
} else {
220220
$v = $value;
221221
}
222-
$result = str_replace("%{$key}%", $v, $result);
222+
$result = \str_replace("%{$key}%", $v ?? '', $result);
223223
}
224224
}
225225
if (isset($js) === true) {

0 commit comments

Comments
 (0)