Pudgemeister Posted May 28, 2013 Share Posted May 28, 2013 Hi all,I've got an error I have yet to come across. "Strict Standards: Only variables should be passed in reference in my/file/name/here.php on line 69" It was quite a long line of code so by separating it out I have found the problem to lie here: $var = end(explode(".", $_FILES["file"]["name"])); It's not code breaking at all-but I am one for trying to be strict with my standards and making sure I get no notices or warnings let alone errors. Just interested in what I am not understanding.Thanks =) Link to comment https://forums.phpfreaks.com/topic/278477-strict-standards-error/ Share on other sites More sharing options...
Jessica Posted May 28, 2013 Share Posted May 28, 2013 Try this: $parts = explode(".", $_FILES["file"]["name"]); $var = end($parts); Some things can't be chained like that in strict. Link to comment https://forums.phpfreaks.com/topic/278477-strict-standards-error/#findComment-1432753 Share on other sites More sharing options...
Pudgemeister Posted May 28, 2013 Author Share Posted May 28, 2013 Hi Jessica, I actually came back to say I'd sorted the problem-and what you have done above is what I tried =D. Thanks for replying - I should think before asking next time hehe.Thank you =) Link to comment https://forums.phpfreaks.com/topic/278477-strict-standards-error/#findComment-1432755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.