Hi @maximebj
Thanks for the topic.
$posts
is not a variable used by WP, so I wonder if you theme / plugins contain some code which is using $posts as well.
I have used $posts
may times in projects and had no issues – inside and outside of the WP loop.
Thanks
E