• In co-authors-plus.php:1150, you set the queried_object_id like so:

    $wp_query->queried_object_id = $authordata->ID;
    

    This results in queried_object_id being set to a string. WP expects this variable on global $wp_query to be an int, and the WP function get_queried_object_id() makes a promise that it returns an int. This has caused my site to crash on author pages due to collisions with other plugins that assume queried_object_id will be an int. Furthermore, other plugins explicitly cast to int when setting queried_object_id. I suggest changing this line to:

    $wp_query->queried_object_id = (int)$authordata->ID;
    
    • This topic was modified 5 years, 12 months ago by gmulz.

The topic ‘queried_object_id should be int’ is closed to new replies.