Reputation: 13
I'm a bit confused by the error I am getting.
The error is:
Strict Standards: Only variables should be passed by reference in functions.php
The line in reference is:
$action = array_pop($a = explode('?', $action)); // strip parameters
Upvotes: 1
Views: 3525
Reputation: 970
$action = array_pop($a = explode('?', $action)); ///Wrong
$action = array_pop($a = (explode('?', $action))); ///Right
Makesure you put explode in brackets like (explode()), that's it..
Upvotes: 0
Reputation: 21
array_pop
the only parameter is an array passed by reference. The return value of explode("?", $action)
does not have any reference.
You should store the return value to a variable first:
$arr = explode('?',$action);
$action = array_pop($arr);
The following things can be passed by reference:
Passing by Reference in PHP Manual
Upvotes: 0
Reputation: 3453
Try this:
$a= explode('?',$action);
$action = array_pop($a);
By the way, what is $action
?
Upvotes: 3