From 075eb170057aed2e4909f2dfa04f67c14fc02de1 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 23 Nov 2018 18:26:09 +0100 Subject: [PATCH] Use continue in case statements to fix ErrorException with PHP 7.3. ``` Fatal error: Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? ``` --- library/Icinga/Application/Modules/Module.php | 2 +- library/Icinga/File/Ini/IniParser.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index bb7c77218..8049217b2 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -686,7 +686,7 @@ class Module case 'depends': if (strpos($val, ' ') === false) { $metadata->depends[$val] = true; - continue; + continue 2; } $parts = preg_split('/,\s+/', $val); diff --git a/library/Icinga/File/Ini/IniParser.php b/library/Icinga/File/Ini/IniParser.php index 2748f78ca..a90b741d4 100644 --- a/library/Icinga/File/Ini/IniParser.php +++ b/library/Icinga/File/Ini/IniParser.php @@ -64,7 +64,7 @@ class IniParser switch ($state) { case self::LINE_START: if (ctype_space($s)) { - continue; + continue 2; } switch ($s) { case '[': @@ -130,7 +130,7 @@ class IniParser case self::DIRECTIVE_VALUE_START: if (ctype_space($s)) { - continue; + continue 2; } elseif ($s === '"') { $state = self::DIRECTIVE_VALUE_QUOTED; } else {