Friday, April 22, 2011

PHPThumb Error Deprecated: Function eregi() phpthumb.class.php - Fix

While using phpthumb for image resizing functions there may arise some issues if the source image is not working or the source image URL is dead.
The usual error found is "Deprecated: Function ereg_replace() is deprecated in phpthumb.class.php on line 976."

To fix this replace the function with

"if (preg_match('#^'.preg_quote($this->config_document_root).'#', $filename)) {"

Hope this will help you !...
Better Luck ! :-)

No comments:

Popular Posts