Reputation: 10828
I have upgraded PHP from v5.3 to v5.4 and I am now getting the following error:
Strict standards: Only variables should be passed by reference
Code:
$filename = array_pop(explode("/", $_SERVER['SCRIPT_FILENAME']));
How to fix this?
Upvotes: 0
Views: 127
Reputation: 95101
Breaking the code apart would resolve the error
$filename = explode("/", $_SERVER['SCRIPT_FILENAME']);
$filename = array_pop($filename);
echo $filename ;
Upvotes: 3