Title: Error in PHP7
Last modified: November 9, 2016

---

# Error in PHP7

 *  Resolved [Daniel](https://wordpress.org/support/users/gabu69/)
 * (@gabu69)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/)
 * Recently I installed [PHP Compatibility Checker plugin](https://wordpress.org/plugins/php-compatibility-checker/)
   to check if all my plugins where compatible with PHP 7.
 * Your plug in displays these Warnings/Errors:
 * FILE: /var/www/SITE.com/public_html/wp-content/plugins/social-networks-auto-poster-
   facebook-twitter-g/inc/nxs_snap_class.php
    ———————————————————————————————————————————–
   FOUND 1 ERROR AFFECTING 1 LINE. ———————————————————————————————————————————– 
   234 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid 
   and will throw a fatal error since PHP 7.0 ———————————————————————————————————————————–
    -  This topic was modified 9 years, 6 months ago by [Daniel](https://wordpress.org/support/users/gabu69/).

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/error-in-php7-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-in-php7-3/page/2/?output_format=md)

 *  [omriamos](https://wordpress.org/support/users/omriamos/)
 * (@omriamos)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417360)
 * This is a false positive.
 * However, this plugin DOES have a fatal error with PHP 7.0 (but I’m not sure from
   which line because I couldn’t get my server to actually display the god damn 
   fatal error) which causes it to crash wordpress completely if already enabled,
   and unable to get re-enabled if manually disabled.
 * When I switched to PHP 5.6 it works without any problems. There is a PHP 7.0 
   issue somewhere.
 *  [Recyclart](https://wordpress.org/support/users/recyclart/)
 * (@recyclart)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417386)
 * exact same problem for me [@omriamos](https://wordpress.org/support/users/omriamos/)
   but with php 7.0.10 update, with previous versions, it worked.
 *  [omriamos](https://wordpress.org/support/users/omriamos/)
 * (@omriamos)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417391)
 * This sounds very correct, because this problem started for me only today (probably
   because of an auto-update of PHP) so it could definitely be related to just new
   versions of PHP 7.
 *  [kimbare](https://wordpress.org/support/users/kimbare/)
 * (@kimbare)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417499)
 * I had the exact same problem today. All of a sudden this afternoon the website
   went all “white”.
 *  [omriamos](https://wordpress.org/support/users/omriamos/)
 * (@omriamos)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417513)
 * Yes, me too. Had to downgrade to php 5.6 at the moment until it will get fixed.
 *  [CelsiusAnderson](https://wordpress.org/support/users/celsiusanderson/)
 * (@celsiusanderson)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8417881)
 * I have been using Php 7.0.12 since October 13. This plugin did not give any error
   until today, to be exact 7 hours ago. The only auto update this plugin can do
   is its API, so it’s related with its api, which we have no control of.
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8418018)
 * We have several sites with PHP7, but we can’t replicate this issue there.
 * If someone is willing to provide us the environment to check it, please open 
   a ticket here [http://www.nextscripts.com/support](http://www.nextscripts.com/support)–
   we will check it ASAP.
 * PS: The issue has nothing to do with false problem reported by very flawed “PHP
   Compatibility Checker plugin” Please see here for the explanation: [https://wordpress.org/support/topic/php7-compatibility-47/](https://wordpress.org/support/topic/php7-compatibility-47/)
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8418385)
 * Here is how to fix it.
 * 1. Install both plugins. Do not activate them. If they are still activated – 
   deactivate them both.
 * 2. Using either WP Plugin editor or FTP open file NextScripts_SNAP.php from /
   social-networks-auto-poster-facebook-twitter-g/
 * 3. find line 27 saying “do_action(‘nxs_doSomeMore’);”
 * Insert the following code before that line:
 * `$dir = explode('social-networks-auto-poster-facebook-twitter-g', plugin_dir_path(
   __FILE__ )); $pf = $dir[0].'nxs-snap-pro-upgrade/nxs-snap-pro-upgrade.php'; if(
   file_exists($pf) && !function_exists('nxs_getInitAdd') ) { require_once $pf; 
   nxs_doChAPIU(); }`
 * Save file.
 * 4. Activate SNAP. (Main plugin, not helper). This will fix your issue.
 * 5. (Important!) Delete the code from NextScripts_SNAP.php. This code does one-
   time fix. Leaving it active, will hurt your site performance.
 * 5. Activate Helper. You are good to go.
 * —————-
 * If all this sounds too complicated, please open a ticket here: [http://www.nextscripts.com/support](http://www.nextscripts.com/support)
   we will do that for you.
 *  [omriamos](https://wordpress.org/support/users/omriamos/)
 * (@omriamos)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8418448)
 * yep, it worked.
    Thanks!
 *  [Recyclart](https://wordpress.org/support/users/recyclart/)
 * (@recyclart)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8418500)
 * Yes, thanks it worked. Will this be corrected in the next update (to be safe 
   to update the plugin next time)?
 *  [CelsiusAnderson](https://wordpress.org/support/users/celsiusanderson/)
 * (@celsiusanderson)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8418668)
 * I made it work in different way. I change the php version to 5.6.27, then site
   came back. Next, from the help/support/about tab I used [Restore settings form
   the last backup], the api went back to 2.24.7 and updated automatically to 2.24.16,
   then I changed back the php to 7.0.12. Everything works perfectly now. I think
   api 2.24.11 is the one which caused this issue.
 * As my site is now working in php 7.0.12, do you think I need to follow your instruction?
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8419878)
 * celsiusanderson, no, you are all good and you are right. That instruction basically
   forcing your site to update API from PHP 7 incompatible 2.24.11 to 2.24.16 **
   before** executing it.
 * API is already corrected, it’s safe to update. This should not happen again.
 *  [EastDevonAlliance](https://wordpress.org/support/users/eastdevonalliance/)
 * (@eastdevonalliance)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8420518)
 * I had a white screen rather than 500 error after upgrade.
 * Move plugin dir for SNAP to temp dir, site comes back to life.
 * Implemented the fix above and put the snap plugin directory back – white screen
   again.
 * Anyone got any other suggestions?
 *  [jorgitobg](https://wordpress.org/support/users/jorgitobg/)
 * (@jorgitobg)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8420486)
 * Hi, fixed here too.
 * But im very worried about this situation… automatic API updates could be a possible
   site down source. How can I deactivate automatic API updates and receive a email
   or similar warning to update API manually so I can supervise it?.
 * Regards,
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-in-php7-3/#post-8420807)
 * >  Anyone got any other suggestions?
 * The suggestion will be to just follow the instructions precisely. For it to work
   both plugins must be deactivated and located in their original folders. If you
   rename or remove it will not work

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/error-in-php7-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-in-php7-3/page/2/?output_format=md)

The topic ‘Error in PHP7’ is closed to new replies.

 * ![](https://ps.w.org/social-networks-auto-poster-facebook-twitter-g/assets/icon-
   256x256.png?rev=1106267)
 * [NextScripts: Social Networks Auto-Poster](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/)
 * [Active Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/reviews/)

 * 18 replies
 * 9 participants
 * Last reply from: [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/error-in-php7-3/page/2/#post-9156502)
 * Status: resolved