Skip to content

Commit

Permalink
Fix null instead of string; closes #17646
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Aug 6, 2024
1 parent 0a1d81f commit 0e6327a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()";
Expand Down

0 comments on commit 0e6327a

Please sign in to comment.