Site logo

Archived topic

Query Monitor: "Undefined variable: Post" + Hook

1 reply · Started by Joseph on October 20, 2020

Viewing posts 1–2 of 2

This image will give you more info.

Just started popping up the past week or so.
It's referring to this line?
eval( '?>' . $content . '<?php ' ); // phpcs:ignore -- Using eval() to execute PHP.

And then it hooks over and over.

Hi there,

That means you have a Hook Element added to your site with an undefined $post variable.

Check your Hook Elements for any $post references.

Feel free to share the code here and I'll see if I can spot the error :)

This archived topic is closed to new replies.