• Resolved cdanni

    (@cdanni)


    I’m currently working in development, so I keep debugging turned on to make sure my theme work isn’t wonky. Presently I’m seeing a notice on category archive pages when there are no posts found. Obviously these will no longer be displayed when I’m not in debug mode, but they’ll continue to clutter up my log files.

    Notice: Trying to get property of non-object in /mypath/wp-content/plugins/jquery-masonry-image-gallery/functions/three-dot-nine.php on line 86

    Notice: Trying to get property of non-object in /mypath/wp-content/plugins/jquery-masonry-image-gallery/functions/three-dot-nine.php on line 22

    Child theme I’m building is based on Genesis 2.x, not sure if that is helpful or not. I’ll send a link privately if it’s of use.

    Thanks!

    https://wordpress.org/plugins/jquery-masonry-image-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author phoenixMagoo

    (@phoenixmagoo)

    Hmmm. I could not reproduce the notices that you are getting. However, I still want to fix the notice.

    Those two lines being referenced were actually taken directly from the WordPress codex:

    if( has_shortcode( $post->post_content, 'gallery') ) {

    I’m going to try to set up my testing environment to throw the error as well. Once I can do that, I should be able to resolve the issue. I’ll keep you posted!

    -Will

    Plugin Author phoenixMagoo

    (@phoenixmagoo)

    Could you please try changing lines 22 and 86 from:

    if( has_shortcode( $post->post_content, 'gallery') ) {

    to:

    if( isset($post->post_content) and has_shortcode( $post->post_content, 'gallery') ) {

    Thanks!

    Thread Starter cdanni

    (@cdanni)

    Thanks, phoenix (Will)! That fixed it!

    Apologies for the delayed reply.

    – Cristina

    Plugin Author phoenixMagoo

    (@phoenixmagoo)

    Awesome!! I will put the fix in the next plugin update.

    Thank you so much for filing a thorough and complete bug report. It really helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Notice when debugging is on’ is closed to new replies.