From a7e42bb613071fb92b8f004317600b2493546ba8 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 5 Aug 2024 17:52:41 +0200 Subject: [PATCH] Fix null instead of string; closes #17646 --- src/Ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ajax.php b/src/Ajax.php index 07b1fbec92c..48457612c25 100644 --- a/src/Ajax.php +++ b/src/Ajax.php @@ -775,7 +775,7 @@ public static function updateItemJsCode( $out .= $key . ":"; $regs = []; - if (!is_array($val) && preg_match('/^__VALUE(\d+)__$/', $val, $regs)) { + if (!is_array($val) && preg_match('/^__VALUE(\d+)__$/', $val ?? '', $regs)) { $out .= Html::jsGetElementbyID(Html::cleanId($toobserve[$regs[1]])) . ".val()"; } else if (!is_array($val) && $val === "__VALUE__") { $out .= Html::jsGetElementbyID(Html::cleanId($toobserve)) . ".val()";