[Plugin: Text Obfuscator] Error message foreach() line 212
-
I had some minor problems with this plugin on one of my blogs but Jonathon Wardman helped me to solve this issues then it worked fine. So fine that I’ve decided to test Text Obfuscator on another blog. But now the post title and content contain the following error:
Warning: Invalid argument supplied for foreach() in /home/myname/domains/myblog.com/public_html/wp-content/plugins/text-obfuscator/text-obfuscator.php on line 212
Here is the code from the line 208 to 224:
function obfuscator_filter( $content, $content_type = 'posts' ) { $replacementData = get_option( 'obfuscator_replacements' ); $replacementTokens = $replacementValues = array(); foreach ( $replacementData AS $replacementItem ) { if ( ! isset( $replacementItem['location'] ) || ( 'post' == $replacementItem['location'] ) ) { if ( ! isset( $replacementItem[$content_type] ) || ( true == $replacementItem[$content_type] ) ) { if ( $replacementElements = obfuscator_build_replacement_elements( $replacementItem ) ) { $replacementTokens[] = $replacementElements['token']; $replacementValues[] = $replacementElements['value']; } } } } return preg_replace( $replacementTokens, $replacementValues, $content ); }
I don’t know what to do but I know that I would really like to use this plugin on my pro blog. As I am a real PHP noob, I would appreciate any help to try resolving this problem. Thanks in advance ??
https://www.ads-software.com/extend/plugins/text-obfuscator/
- The topic ‘[Plugin: Text Obfuscator] Error message foreach() line 212’ is closed to new replies.