[Plugin: WP Super Cache] wp super cache Warning: strpos() [function.strpos]: Offset not contained in
-
I upgraded to Version 3.4 on our multiuser/networked WordPress site. The root WordPress installation is in a subfolder in public_html, and the networked blogs are in subfolders (not subdomains). Then I upgraded to WP Super Cache 1.1. Then I got several wp-super-cache warning messages. So I duplicated our site on a test xampp on my laptop (which I’ve done many times). I get the same warning/notice messages:
Warning: strpos() [function.strpos]: Offset not contained in string in C:\xampp\htdocs\wp\wp-content\plugins\wp-super-cache\wp-cache-base.php on line 26
Notice: Undefined variable: cache_wptouch in C:\xampp\htdocs\wp\wp-content\plugins\wp-super-cache\plugins\wptouch.php on line 109
I googled the strpos() phrase and found a large number of active websites with the same warning messages. This is worrisome. So I disabled wp super cache on our live website.
On my test xampp, I added a space between the ” on line 26 of wp-cache-base.php and this got rid of the Warning message.
Here is the original code:
$blogcacheid = str_replace( $base, '', $request_uri );
Here is my edited code:
$blogcacheid = str_replace( $base, ' ', $request_uri );
I also added a similar space on line 49 of wp-cache-config.php and got rid of that warning message.
Here is the original code:
$blogcacheid = str_replace( $base, '', $request_uri );
Here is my edited code:
$blogcacheid = str_replace( $base, ' ', $request_uri );
I would like to know if this is a safe hack for my site, and is adding a space between the ” assigned to $blogcacheid a possible remedy for the many websites found in my google search. I have never changed any of the core code.
Thank you in advance for any help.
- The topic ‘[Plugin: WP Super Cache] wp super cache Warning: strpos() [function.strpos]: Offset not contained in’ is closed to new replies.