GeoDirectory SupportNotice : Object of class WP_Post could not be converted to int – GeoDirectory Support https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/feed Sat, 18 Oct 2025 17:14:24 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54516 <![CDATA[Notice : Object of class WP_Post could not be converted to int]]> https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54516 Fri, 25 Sep 2015 17:17:22 +0000 Dylan 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.

]]>
https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54519 <![CDATA[Reply To: Notice : Object of class WP_Post could not be converted to int]]> https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54519 Fri, 25 Sep 2015 17:29:38 +0000 Stiofan O'Connor 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

]]>
https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54543 <![CDATA[Reply To: Notice : Object of class WP_Post could not be converted to int]]> https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54543 Fri, 25 Sep 2015 18:53:11 +0000 Paolo 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

]]>
https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54552 <![CDATA[Reply To: Notice : Object of class WP_Post could not be converted to int]]> https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54552 Fri, 25 Sep 2015 19:57:15 +0000 Dylan https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54616 <![CDATA[Reply To: Notice : Object of class WP_Post could not be converted to int]]> https://wpgeodirectory.com/support/topic/notice-object-of-class-wp_post-could-not-be-converted-to-int/#post-54616 Sat, 26 Sep 2015 08:59:49 +0000 Stiofan O'Connor 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

]]>