Title: False negative?
Last modified: October 15, 2022

---

# False negative?

 *  Resolved [001122334455](https://wordpress.org/support/users/dkanika/)
 * (@dkanika)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/false-negative-4/)
 * Hello, I am adding some PHP into my site and sometimes the plugin automatically
   disables the snippet.
 * Sometimes when i try to activate it from dashboard it gives an error – says what
   but not on what line
 * Then activating it again, without any change to code, it goes live. And after
   some time it can again randomly deactivate the snippet
 * I run the code through some online tools and there was no error detected… it 
   would be very useful to know where the error is, or perhaps is this false negative
   if no other tools detected this error?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/false-negative-4/#post-16104749)
 * Hi [@dkanika](https://wordpress.org/support/users/dkanika/),
 * From what you are describing, it may be that the syntax of the code is correct
   but it may generate an error at runtime. For example, your code may be calling
   a function that is not always loaded before the snippet gets executed, in this
   case the syntax is 100% correct but when you run the code in a different context,
   if the function is not loaded, it will throw a fatal error, which WPCode will
   catch and disable the snippet to prevent you from getting locked out of your 
   site.
 * If activating the snippet from the list of snippets throws an error that is also
   an indicator that a part of code needed to correctly run the snippet is not always
   loaded but it depends on the actual error message you get. It sounds like the
   code you are trying to use is available in the admin but not in the frontend 
   so that’s why activating in the admin works but when you run the snippet in the
   frontend it fails (or via AJAX in the list of snippets).
 * If you can share more details (what error you receive, the snippet code) we can
   try to help you debug this.
 * Thanks
 *  Thread Starter [001122334455](https://wordpress.org/support/users/dkanika/)
 * (@dkanika)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/false-negative-4/#post-16105575)
 * Hello, thanks for the reply. Currently it’s not giving any error and everything
   works fine, so I’ll wait until it happens again.
 *  Thread Starter [001122334455](https://wordpress.org/support/users/dkanika/)
 * (@dkanika)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/false-negative-4/#post-16114244)
 * Hello, got the error again
 * Syntax error, unexpected &
 * Here is the code: [https://docs.google.com/document/d/14pEkBq6u6Vv7_YXv5uX57nuktkcdLIyfpHPYDbQL8kE/edit?usp=sharing](https://docs.google.com/document/d/14pEkBq6u6Vv7_YXv5uX57nuktkcdLIyfpHPYDbQL8kE/edit?usp=sharing)
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘False negative?’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [001122334455](https://wordpress.org/support/users/dkanika/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/false-negative-4/#post-16114244)
 * Status: resolved