Skip to content

Commit

Permalink
Fix null instead of string; closes glpi-project#17646
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Aug 5, 2024
1 parent cb7c519 commit a7e42bb
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 a7e42bb

Please sign in to comment.