Title: eval()&#8217;d code error
Last modified: January 18, 2019

---

# eval()’d code error

 *  Resolved [twicealive](https://wordpress.org/support/users/twicealive/)
 * (@twicealive)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/)
 * I am getting the following error even when I have no snippet code entered:
 * [16-Jan-2019 17:32:29 UTC] PHP Parse error: syntax error, unexpected ‘-‘, expecting‘(‘
   in /home/networkservices/public_html/wp-content/plugins/code-snippets/php/snippet-
   ops.php(356) : eval()’d code on line 5
 * I checked the database and the code field is truly empty. I also purged the cache
   and deployed “define(‘CODE_SNIPPETS_SAFE_MODE’, true);” but I still get this 
   error.
 * I am running code snippets v2.13.0 wordpress v5.0.3 server php v5.6
    I want to
   update to php 7.x, but wordpress won’t load in php7 while code snippets is activated.
   Instead, I get a white screen that states the above error. (the site does load
   using php 5.6 and the error is logged in the error file).
 * Any ideas?
 * Thanks,
    Michael Robinson
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fevald-code-error-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11106833)
 * It definitely looks like you have an active snippet that is causing an error.
   I would recommend removing all databases tables ending in `snippets`.
 * Are you running a WordPress multisite network, or is this a single site install?
 *  Thread Starter [twicealive](https://wordpress.org/support/users/twicealive/)
 * (@twicealive)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11111042)
 * Thanks Shea
 * I found a table in an old site where the plugin was not active; then the error
   was easy to locate. Since I fixed my code issue, everything is working fine.
 * Your plugin evaluates all code snippets whether they are active or not, even 
   if the plugin is not activated for a site, and even if it is disabled via the
   wp-config file.
 * I like it.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11111728)
 * That’s quite strange to hear. I’m not sure how an inactive plugin could possibly
   do anything at all, and the plugin checks whether the safe mode constant is set
   before executing anything.
 *  [andylockhart](https://wordpress.org/support/users/andylockhart/)
 * (@andylockhart)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11158441)
 * This might be a similar problem but I am getting the following:
 * CRITICAL syntax error, unexpected ‘:’ in /home/marily91/public_html/wp-content/
   plugins/code-snippets/php/snippet-ops.php(356) : eval()’d code on line 2
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11160659)
 * Hi [@andylockhart](https://wordpress.org/support/users/andylockhart/),
 * This error is being caused by the code on line two of one of your snippets. It’s
   not something I can fix in the plugin; you’ll need to track down the snippet 
   causing the error and fix it.

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

The topic ‘eval()’d code error’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/evald-code-error-2/#post-11160659)
 * Status: resolved