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()";