Your problem isn’t line 780 of ../wp-includes/class-wp-query.php
So it’s a little bit hard to help because you’re not showing the actual code that’s at fault.
But you’re probably trying to reference a post category by its data object instead of using the integer id.
For example you might have something like this:
$mycategory=get_category_by_slug('a-category-slug');
$args = array( 'posts_per_page' => -1, 'category' => $mycategory);
$myposts = get_posts( $args );
But $mycategory
is an object, not an integer value.
You would need to add ->term_id
to get its integer value:
$mycategory=get_category_by_slug('a-category-slug');
$args = array( 'posts_per_page' => -1, 'category' => $mycategory->term_id);
$myposts = get_posts( $args );