Closed thathoff closed 2 years ago
The route:after closure expects the 4th argument ($result) to be a String. But in some cases Kirby does not insert a string here. This happens for example if you have a custom route returning an array.
route:after
$result
String
[ 'pattern' => 'retourtest', 'action' => function () { return ['foo' => 'bar']; } ],
Argument 4 passed to Kirby\Cms\App::distantnative\Retour\{closure}() must be of the type string or null, array given
No TypeError thrown.
Came to report this - i confirm fix worked for me.
Great, will try to release a new beta this weekend - thanks @thathoff
✅ Will be fixed in 4.0 release
Describe the bug
The
route:after
closure expects the 4th argument ($result
) to be aString
. But in some cases Kirby does not insert a string here. This happens for example if you have a custom route returning an array.Steps to reproduce
Argument 4 passed to Kirby\Cms\App::distantnative\Retour\{closure}() must be of the type string or null, array given
is thrown.Expected behavior
No TypeError thrown.