FALSE POSITIVE: Using ‘break’ outside of a loop
-
The WP Engine compatibility checker is throwing up this error:
FILE: /wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_snap_class.php
———————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
———————————————————————————————
238 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
———————————————————————————————Line 238:
foreach ($nxs_snapAvNts as $avNt) if (count($options[$avNt['lcode']])>0) { $isNoNts = false; break; }
So as you can see “break” is properly used INSIDE the “foreach” loop. Your tool just misdiagnosed it because of the “if” statement that it can’t understand.
This is totally fine PHP syntax, yet your tool can’t recognize it.
Please fix this. A lot of people are using your tool and complaining that our plugin is not compatible, while it has no issues with PHP 7
- The topic ‘FALSE POSITIVE: Using ‘break’ outside of a loop’ is closed to new replies.