• Cannot use object of type WP_Query as array in /var/www/blog/wp/wp-content/plugins/w3-total-cache/inc/define.php on line 1495
    Stack trace:

    1. {main}() /index.php:0
    2. require() index.php:17
    3. require_once() /wp/wp-blog-header.php:16
    4. include() /wp/wp-includes/template-loader.php:74
    5. get_template_part() /wp/wp-content/themes/mytheme/base.php:22
    6. locate_template() /wp/wp-includes/general-template.php:171
    7. load_template() /wp/wp-includes/template.php:477
    8. require() /wp/wp-includes/template.php:503
    9. wp_footer() /wp/wp-content/themes/mytheme/templates/footer.php:21
    10. do_action() /wp/wp-includes/general-template.php:2211
    11. call_user_func_array() /wp/wp-includes/plugin.php:496
    12. wp_admin_bar_render() /wp/wp-includes/plugin.php:496
    13. do_action_ref_array() /wp/wp-includes/admin-bar.php:77
    14. call_user_func_array() /wp/wp-includes/plugin.php:571
    15. W3_Plugin_TotalCache->admin_bar_menu() /wp/wp-includes/plugin.php:571
    16. w3_detect_post_id() /wp/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php:239

    The line in question /var/www/blog/wp/wp-content/plugins/w3-total-cache/inc/define.php on line 1495 is:
    return $posts[0]->ID;

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • This error is also happening on our blog.

    Could you please check the error? My site got this error too.
    Stack trace:

    Fatal error: Cannot use object of type WP_Query as array in D:\git\knote\wp-content\plugins\w3-total-cache\inc\define.php on line 1495
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0175	250992	{main}( )	..\index.php:0
    2	0.0379	254488	require( 'D:\git\knote\wp-blog-header.php' )	..\index.php:17
    3	81.5114	52919960	require_once( 'D:\git\knote\wp-includes\template-loader.php' )	..\wp-blog-header.php:16
    4	82.7863	53506960	include( 'D:\git\knote\wp-content\themes\marroco\templates\custom-page-builder.php' )	..\template-loader.php:74
    5	98.0598	57533272	get_footer( )	..\custom-page-builder.php:48
    6	98.0598	57533968	locate_template( )	..\general-template.php:85
    7	98.0778	57534136	load_template( )	..\template.php:477
    8	98.1783	57553216	require_once( 'D:\git\knote\wp-content\themes\marroco\footer.php' )	..\template.php:501
    9	98.2443	57553392	wp_footer( )	..\footer.php:49
    10	98.2443	57553504	do_action( )	..\general-template.php:2211
    11	98.2865	57580040	call_user_func_array ( )	..\plugin.php:496
    12	98.2865	57580072	wp_admin_bar_render( )	..\plugin.php:496
    13	98.2866	57580528	do_action_ref_array( )	..\admin-bar.php:77
    14	98.3794	57685512	call_user_func_array ( )	..\plugin.php:571
    15	98.3794	57685640	W3_Plugin_TotalCache->admin_bar_menu( )	..\plugin.php:571
    16	98.4424	57732480	w3_detect_post_id( )	..\TotalCache.php:241

    Did you find any solution? I’m getting a similar error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug: Cannot use object of type WP_Query as array’ is closed to new replies.