PHP8 / Call to undefined function create_function()
-
Just an FYI for those still supporting this plug-in on modern servers, specifically PHP8 which has removed
create_function()
.Others have posted regarding this, but the one solution with a recommendation is not quite correct, so I figured I’d post this for any others in this situation.
In wp-spamshield.php, around line 2030, change
return preg_replace_callback( $regex_phrase, create_function( '$matches', 'return'.$encode_method.'($matches[0]);' ), $string );
to
return preg_replace_callback( $regex_phrase, function($matches) use( $encode_method ) { return $encode_method($matches[0]); }, $string );
- The topic ‘PHP8 / Call to undefined function create_function()’ is closed to new replies.