diff --git a/src/Http/UrlScript.php b/src/Http/UrlScript.php index e43f17f8..fdc26fae 100644 --- a/src/Http/UrlScript.php +++ b/src/Http/UrlScript.php @@ -54,7 +54,8 @@ public function withPath(string $path, string $scriptPath = '') { $dolly = clone $this; $dolly->scriptPath = $scriptPath; - return call_user_func([$dolly, 'parent::withPath'], $path); + $parent = \Closure::fromCallable([UrlImmutable::class, 'withPath'])->bindTo($dolly); + return $parent($path); }