• 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 works

    if ($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 usual post_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

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @stefano93 – Please update to the current version of WordPress, both as a standard benchmark and more importantly for the security issues it addresses.

    Thanks!

    – Cais.

    Thread Starter stefano93

    (@stefano93)

    @photocrati, I know the security risks of not updating but I’m working locally for the moment. I don’t think the bug is related to the WordPress version.

    Plugin Contributor photocrati

    (@photocrati)

    @stefano93 – As noted in the code we will eventually be removing this check but, again, I would recommend updating to the current release of WordPress all the same to see if the issue persists.

    Thanks!

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning notice using SearchWP Live Ajax Search plugin’ is closed to new replies.