This commit is contained in:
2021-08-25 11:26:57 +08:00
parent c995bb7e51
commit 441ce5fd45
+1 -1
View File
@@ -97,7 +97,7 @@ class Node
*/
public function setHandler($handler, $path): static
{
$this->sourcePath = $path;
$this->sourcePath = '/' . ltrim($path, '/');
if (is_string($handler) && str_contains($handler, '@')) {
$handler = $this->splitHandler($handler);
} else if ($handler != null && !is_callable($handler, true)) {