Fix deprecation warning in Notification.php by handling null values in preg_quote()
Addressed a deprecation warning in `Notification.php` related to the `preg_quote()` function. The warning occurred because `preg_quote()` was being passed `null` values, which is deprecated in PHP 8.2.
This commit is contained in:
parent
b9057afd08
commit
9cb16da73f
|
|
@ -146,7 +146,8 @@ abstract class Notification extends BaseNotification implements ShouldQueue
|
|||
$new_vars = [];
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$new_vars[] = preg_quote($var);
|
||||
// Ensure $var is a string, default to an empty string if it is null
|
||||
$new_vars[] = preg_quote($var ?? '');
|
||||
}
|
||||
|
||||
return $new_vars;
|
||||
|
|
|
|||
Loading…
Reference in New Issue