How can I return empty array in my Query Editor (PHP)

Hello,

I’m fetching some Posts from a MB field with my own custom function:

And the data is empty (because I didn’t selected any posts yet), how can I make sure my query loop from Bricks is not displayed because I didn’t have any Posts attached?

I tried 0, null, ‘’, array() but nothing seems to work, it default back to the normal query and display 10 random posts.

return [
'post_type' => 'fake_post_type',
];

would return no posts when used in a query loop

(if you return an empty array, you’re then just doing a wpquery with the default arguments which would still return published posts)

I think this should do the job

else {
  return [];
}

That’s perfect, thanks for the solution David!