mdmartiny Posted April 8, 2012 Share Posted April 8, 2012 I keep getting this error code and not sure why Strict Standards: Only variables should be passed by reference in This is the line of code that it reference to. $file_ext = strtolower(end(explode(".", $file_name))); Can someone please help me Quote Link to comment https://forums.phpfreaks.com/topic/260544-strict-standards-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 8, 2012 Share Posted April 8, 2012 end expects an actual array variable as a parameter - The array. This array is passed by reference because it is modified by the function. This means you must pass it a real variable and not a function returning an array because only actual variables may be passed by reference. You need to assign the result of the explode() statement to a program variable and then supply that as the parameter to the end() statement. Quote Link to comment https://forums.phpfreaks.com/topic/260544-strict-standards-help/#findComment-1335319 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.