PHP7 Bug (v3.4.6)
-
FILE: /home/public_html/wp-content/plugins/wp-appbox/inc/queryelements.php -------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------- 5662 | ERROR | Using 'break' outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0 --------------------------------------------------------------------------------------------------------------------------
can be fixed with return instead of break.
complete fixed function:public static function removeData($node, $name, $documentID) { if (! $documentID) // TODO check if this works $documentID = self::getDocumentID($node); $document = phpQuery::$documents[$documentID]; $node = self::dataSetupNode($node, $documentID); $id = $node->dataID; if ($name) { if (isset($document->data[$id][$name])) unset($document->data[$id][$name]); $name = null; foreach($document->data[$id] as $name) return; //break; if (! $name) self::removeData($node, $name, $documentID); } else { self::dataRemoveNode($node, $documentID); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP7 Bug (v3.4.6)’ is closed to new replies.