Support » Plugin: Popup anything on click » Trying to get property ‘post_title’ of non-object

  • Resolved brunoeficiens

    (@brunoeficiens)


    Hi,

    Would it be possible to change the file /popup-anything-on-click/includes/shortcode/popupaoc-popup-shortcode.php on lines 94 and 95 to avoid PHP Notices in some specific cases?

    Current code :
    $image_title = $attachment->post_title;
    $image_caption = $attachment->post_excerpt;

    Correction:
    $image_title = !empty($attachment->post_title) ? $attachment->post_title : ”;
    $image_caption = !empty($attachment->post_excerpt) ? $attachment->post_excerpt : ”;

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Riddhi Shukla

    (@ridhimashukla)

    Hello,

    Thank you for reaching us…

    Yes, you can able to modify that, but take a note that your changes will be lost after update to the new version.

    Thank you for letting us know, I will also take a note for the future version.

    Thank you for your answer. I hope it will be integrated in futures versions.

    Plugin Support Ketan Patel

    (@patelketan)

    Hello,

    If you like this Plugin Please give your Important Rate and Review Here…

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.