• Resolved sgarcia513

    (@sgarcia513)


    I have debugging turned on trying to figure out exhausted memory issues on a client’s site and in doing so I’m seeing a lot of PHP notices from the dynamic text extension on line 331.

    Trying to get property of non-object in /*domain-path*/wp-content/plugins/contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php on line 331

    Here’s what’s on line 331:
    $val = $post->$key;

    The plugin itself seems to be working properly and since this is a notice I guess this goes more into the FYI bucket.

    Thanks!

    PHP 7.0
    WP: 5.1
    CF7: 5.1.1
    CF7 DTE: 2.0.2.1

    • This topic was modified 5 years, 8 months ago by sgarcia513.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Hi,

    That means that there is no global $post variable to get the key from – in other words, you’re running the CF7_get_post_var shortcode on a non-post page. You need to make sure you’re only running it on posts ??

    That being said, the notice isn’t hurting anything, and it won’t cause a memory issue.

    Hope that helps!

    Thread Starter sgarcia513

    (@sgarcia513)

    Understood and it makes sense. We ended up figuring out the memory issues found elsewhere but was looking at all avenues. Thanks for the quick response!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notice: Trying to get property of non-object’ is closed to new replies.