Notice : Object of class WP_Post could not be converted to int

This topic contains 4 replies, has 3 voices, and was last updated by  Stiofan O’Connor 9 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #54516

    Dylan
    Expired Member
    Post count: 40

    Hello,

    We are seeing this in the debug log:

    
    
    [25-Sep-2015 17:12:07 UTC] PHP Notice:  Object of class WP_Post could not be converted to int in /var/www/html/wp-content/plugins/geodirectory/geodirectory-functions/post_functions.php on line 2402
    [25-Sep-2015 17:12:07 UTC] PHP Stack trace:
    [25-Sep-2015 17:12:07 UTC] PHP   1. {main}() /var/www/html/index.php:0
    [25-Sep-2015 17:12:07 UTC] PHP   2. require() /var/www/html/index.php:17
    [25-Sep-2015 17:12:07 UTC] PHP   3. require_once() /var/www/html/wp-blog-header.php:16
    [25-Sep-2015 17:12:07 UTC] PHP   4. include() /var/www/html/wp-includes/template-loader.php:75
    [25-Sep-2015 17:12:07 UTC] PHP   5. do_action() /var/www/html/wp-content/themes/open-truk/geodirectory/geodir-home.php:51
    [25-Sep-2015 17:12:07 UTC] PHP   6. call_user_func_array() /var/www/html/wp-includes/plugin.php:503
    [25-Sep-2015 17:12:07 UTC] PHP   7. geodir_action_home_content() /var/www/html/wp-includes/plugin.php:503
    [25-Sep-2015 17:12:07 UTC] PHP   8. do_action() /var/www/html/wp-content/plugins/geodirectory/geodirectory_template_actions.php:3105
    [25-Sep-2015 17:12:07 UTC] PHP   9. call_user_func_array() /var/www/html/wp-includes/plugin.php:503
    [25-Sep-2015 17:12:07 UTC] PHP  10. geodir_action_home_content_inside() /var/www/html/wp-includes/plugin.php:503
    [25-Sep-2015 17:12:07 UTC] PHP  11. dynamic_sidebar() /var/www/html/wp-content/plugins/geodirectory/geodirectory_template_actions.php:3077
    [25-Sep-2015 17:12:07 UTC] PHP  12. call_user_func_array() /var/www/html/wp-includes/widgets.php:1319
    [25-Sep-2015 17:12:07 UTC] PHP  13. WP_Widget->display_callback() /var/www/html/wp-includes/widgets.php:1319
    [25-Sep-2015 17:12:07 UTC] PHP  14. geodir_popular_postview->widget() /var/www/html/wp-includes/widgets.php:344
    [25-Sep-2015 17:12:07 UTC] PHP  15. geodir_popular_postview_output() /var/www/html/wp-content/plugins/geodirectory/geodirectory-widgets/geodirectory_popular_widget.php:159
    [25-Sep-2015 17:12:07 UTC] PHP  16. include() /var/www/html/wp-content/plugins/geodirectory/geodirectory-functions/general_functions.php:2982
    [25-Sep-2015 17:12:07 UTC] PHP  17. geodir_favourite_html() /var/www/html/wp-content/plugins/geodirectory/geodirectory-templates/widget-listing-listview.php:188
    [25-Sep-2015 17:12:07 UTC] PHP  18. in_array() /var/www/html/wp-content/plugins/geodirectory/geodirectory-functions/post_functions.php:2402

    Are you aware of this?
    Thanks.

    #54519

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi,

    This is not a core problem, i guess it’s related to your request here: https://wpgeodirectory.com/support/topic/relocate-the-favorite-link-only/

    Please paste exactly what code you used for that.

    Stiofan

    #54543

    Paolo
    Site Admin
    Post count: 31211

    That is just a notice in any case you could solve it with this: https://wpgeodirectory.com/docs/faqs/help-i-get-a-php-warning-on-my-pages/

    Let us know,

    Thanks

    #54552

    Dylan
    Expired Member
    Post count: 40
    This reply has been marked as private.
    #54616

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    That does look right to me, are u still getting the PHP notice in you logs?
    Maybe try changing to

    geodir_favourite_html('',$postid);

    but i dont think that should make any difference.

    Stiofan

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount