ereg function deprecated
Closed this issue · 1 comments
xenmic commented
the ereg function (line 24) is deprecated in php5.3 - http://www.php.net/ereg
also, your use ignores images on other protocols, such as https / ftp
May I recommend something like parse_url (http://www.php.net/manual/en/function.parse-url.php) which will strip out the protocol, and if that is set in the result, then you can assume remote image).
Something like (in place of line 24)
$aURLInfo = parse_url($imagePath);
if(isset($aURLInfo['scheme'])) {
should do the trick ...
wes commented
I just updated the function to use parse_url, thanks for the suggestion