Skip to content

Commit aaf3913

Browse files
committed
PHP84: strpos(): Passing null to parameter laravel#1 ($haystack) of type string is deprecated
1 parent 33e6739 commit aaf3913

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Illuminate/Routing/UrlGenerator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,10 @@ public function formatParameters($parameters)
611611
*/
612612
protected function extractQueryString($path)
613613
{
614-
if (($queryPosition = strpos($path, '?')) !== false) {
614+
if (
615+
$path !== null
616+
&& ($queryPosition = strpos($path, '?')) !== false
617+
) {
615618
return [
616619
substr($path, 0, $queryPosition),
617620
substr($path, $queryPosition),

0 commit comments

Comments
 (0)