Skip to content

Commit dd095bd

Browse files
Fix programming error causing undefined property access when dynamic value is unset
Dynamic property access ($row->{$column}) caused PHP warnings when `$value` was undefined, resulting in attempts to read non-existent properties. Updated the logic to use null coalescin, which safely returns `null` for missing properties and prevents these warnings.
1 parent c2c9a6b commit dd095bd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Filter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,7 @@ protected function performMatch(Rule $rule, $row)
536536
*/
537537
protected function extractValue($column, $row)
538538
{
539-
try {
540-
return $row->{$column};
541-
} catch (Throwable $_) {
542-
return null;
543-
}
539+
return $row->$column ?? null;
544540
}
545541

546542
/**

0 commit comments

Comments
 (0)