You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the error you're getting? I'm glad you're trying to debug, but it's easier if you tell us what you expected to happen, and what actually happened so we can see what the problem might be.
Sorry it took me so long. I've added a new test for this that replicates it about as closely as I can, and the tests pass with the expected parameters.
Your regex pattern looks fine at a glance.
I'm not sure why it's showing that like it is, but I expect if you set your parameters you expect in your method it should be fine:
public function objectsSortCreate($object, $sort, $key)
{
. . .
}
I defined routing like this:
$routes->get('/objects/(:Dalphanum)/sort/(:Dalphanum)/([A-Z]{3,7})', 'AdminList::objectsSortCreate/$1/$2/$3', ['subdomain' => 'adm']);
where Dalphanum is:
$routes->addPlaceholder('Dalphanum', '([0-9a-zA-Z_\-\.]+)');
And
var_dump(func_get_args());
which is inside objectsSortCreate method prints:
array(3) { [0]=> string(6) "someth" [1]=> string(6) "someth" [2]=> string(3) "FOO" }
when I'm trying to open:
https://adm.dmvoneway.com/objects/someth/sort/FOO/BAR
when I changed route for:
$routes->get('/objects/(:Dalphanum)/sort/(:Dalphanum)/([A-Z]{3,7})', 'AdminList::objectsSortCreate/$1/$2/$3/$4/$5', ['subdomain' => 'adm']);
var_dump prints:
array(5) { [0]=> string(6) "someth" [1]=> string(6) "someth" [2]=> string(3) "FOO" [3]=> string(3) "FOO" [4]=> string(3) "BAR" }
I'm not sure if should be:
[0] => someth
[1] => sort
[2] => FOO
[3] => BAR
instead of returning value.
The text was updated successfully, but these errors were encountered: