Co-Authors-Plus
Co-Authors-Plus copied to clipboard
Guarantee that $wp_query->queried_object_id is an integer
You're changing the default queried_object_id
on authors pages to the guest author's ID here. At least on my test environment, this is now a string, which conflicts with the declared type of that field which should be an integer:
/**
* The ID of the queried object.
*
* @since 1.5.0
* @var int
*/
public $queried_object_id;
So any code that uses it and relies on the value to be an integer is now prone to throwing a fatal (which is further amplified by static type-hinting becoming more ubiquitous).
Please cast this to (int)
before setting the variable.
@Biont Hi there! Thanks for reporting this -- feel free to open up a PR with steps on reproducing.