How to fix this error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
caioebruno
Forum Newbie
Posts: 2
Joined: Wed Aug 27, 2014 1:52 am

How to fix this error

Post by caioebruno »

"Strict Standards: Only variables should be passed by reference in /code/opentape_common.php on line 283"


if ( strcmp($file, ".") && strcmp($file, "..") && !strcasecmp(end(explode(".", $file)), "mp3")) {


Thanks!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to fix this error

Post by requinix »

Code: Select all

end(explode(".", $file))
end() wants a reference and you're not giving it one.

Use pathinfo to get the file extension.
caioebruno
Forum Newbie
Posts: 2
Joined: Wed Aug 27, 2014 1:52 am

Re: How to fix this error

Post by caioebruno »

can you help me with this? I am a layman in the subject
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to fix this error

Post by requinix »

I tried helping you. Is there something specifically that you need? Did you check that link, read the documentation there, and perhaps read through some of the user comments?
Post Reply