Welcome Guest, Not a member yet? Register   Sign In
missing argument in function???
#1

[eluser]123wesweat[/eluser]
I am getting a php warning like
Quote:Message: Missing argument 2

when i go to a routed url
Quote:$route['controllername/nice-name/:any/:any'] = "controllername/method-name/";
like so
Quote:mydomain.com/controllername/nice-name/param1/param2
i get the warning


but when i go to
Quote:mydomain.com/controllername/method-name/param1/param2

i don't get a warning

Why is this???

ps: i have 'hacked' the function by using function($a, $b=NULL) {
but that doesn't explain it to?
#2

[eluser]Dolrich[/eluser]
If im not wrong, it should be.

Code:
$route['controllername/nice-name/:any/:any'] = "controllername/method-name/$1/$2";

Here is the guide for uri routing.
http://ellislab.com/codeigniter/user-gui...uting.html
#3

[eluser]123wesweat[/eluser]
tx, you're right




Theme © iAndrew 2016 - Forum software by © MyBB