I've Just moved over to a new host and I'm getting these errors:
Strict Standards: Only variables should be passed by reference in /home/---/public_html/dl/index.php on line 34**
This is what is on line 34:
echo '<title>'.str_replace('%20', ' ', end(array_filter(explode("/", $_GET['dir'])))).' | PlayWAP.Mobi</title>';**
And then I'm getting this as well:
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/---/public_html/dl/id.php on line 403**
Please can you help?
The function
end()
does expect a variable, not a function result, as is documented on php.net: http://php.net/endThe PEAR class does not define it's method
isError()
as static, so you are not allowed to call it like this:PEAR::isError($foo)
.Both errors can be disabled by setting a less strict error level, but they are signs of a codebase getting older and needing a refresh. Without fixing these errors (and not just silencing the error output), you might be unable to use your website on a new PHP installation in some years.