From: Eric P. <er...@ar...> - 2018-07-14 19:00:47
|
I recently upgraded my php installation and found the unsafe_images_rules was causing unsafe images to no longer works. Turns out it was using eregi(), which is deprecated. Simply switched it for preg_match() and now all seems to work. Here's my patch: --- functions.php.orig 2018-07-14 11:36:07.648915558 -0700 +++ functions.php 2018-07-14 11:36:36.295868619 -0700 @@ -332,7 +332,7 @@ function unsafe_image_rules_link_string($str) { global $unsafe_image_found_email, $Email_RegExp_Match; - while (eregi('(' . $Email_RegExp_Match . ')', $str, $hits)) { + while (preg_match('(' . $Email_RegExp_Match . ')', $str, $hits)) { $str = substr(strstr($str, $hits[0]), strlen($hits[0])); if (! isset($unsafe_image_found_email[$hits[0]])) { echo '?address=' . -Eric |