• Hi
    I get the following error in my logfile:
    [09-Oct-2016 18:51:01 UTC] PHP Notice: Trying to get property of non-object in /var/www/borneyogahulen.dk/teenyogaspace.com/wp-content/plugins/conditional-menus/init.php on line 268

    Do you know what it is about?

    Thomas

Viewing 1 replies (of 1 total)
  • I’m able to replicate the problem on a fresh installation of WP. Do the following:
    1. Install Conditional Menus
    2. Create a new menu
    3. Add a conditional menu with the condition to be viewed for “Sample Page”, i.e. a page.
    4. Go to the home page (or the search page)
    5. Get the error Trying to get property of non-object in /var/www/borneyogahulen.dk/teenyogaspace.com/wp-content/plugins/conditional-menus/init.php on line 268

    The reason this error appear is because when doing $query_object->post_name this object is null, because get_queried_object(); returned null. I haven’t read the code good enough to know the correct solution, but for me it was to add ! is_search() and ! is_front_page() to the if-statement on line 266.

    • This reply was modified 8 years, 1 month ago by mas15ogu.
Viewing 1 replies (of 1 total)
  • The topic ‘PHP error’ is closed to new replies.