Warning notice using SearchWP Live Ajax Search plugin
-
Hello,
I’m using WordPress 3.9.2 (I know we’re at 4.2.2, I’m going to update really soon) and I have NextGen Gallery 2.1.0 and SearchWP Live Ajax Search 1.1 installed (latest versions). When I use the search form in development environment with errors turned on, this warning appears:Notice: Undefined property: stdClass::$content in wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\third_party_compat\module.third_party_compat.php on line 339
The line causing the bug is the following:
if ($post AND !is_array($post->content) AND (strpos($post->content, "<!--nextpage-->") === FALSE) AND (strpos($_SERVER['REQUEST_URI'], '/page/') !== FALSE)) {
If I change the order of the
if
to the code below it worksif ($post AND (strpos($_SERVER['REQUEST_URI'], '/page/') !== FALSE) AND !is_array($post->content) AND (strpos($post->content, "<!--nextpage-->") === FALSE)) {
However, this is a fix for my specific problem. I’m a newbie in WordPress development, but I don’t remember to had ever seen a content property. Dumping
$post
, I see the usualpost_content
property. Maybe it was a mismatch, maybe not but it would be great if you could fix it.- MySQL: 5.6.25
- PHP: 5.6
- mod_rewrite Apache module activated: yes
- PHP Safe Mode OFF: yes
- The topic ‘Warning notice using SearchWP Live Ajax Search plugin’ is closed to new replies.