From 9b695da86bb77e1982cf6818c3f5c4eb46b7b94a Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 14 Oct 2019 12:31:28 +0200 Subject: [PATCH] (cp 15d8a19) fixes #988 no more warning on PHP 7.3 This fix was initially only for branch 2.9, and branch master should have received a new version of jshrink, but I forgot to do it before 2.10 and now we have a regression in 2.10. This commit will be cherry-picked to 2.10 and we also have it on master so that we don't have a new regression in 2.11 (in case jshrink is not properly updated) --- include/jshrink.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/jshrink.class.php b/include/jshrink.class.php index b32807c4a..0229bd8a9 100644 --- a/include/jshrink.class.php +++ b/include/jshrink.class.php @@ -192,7 +192,7 @@ class JShrink_Minifier case "\n": // if the next line is something that can't stand alone // preserve the newline - if(strpos('(-+{[@', $this->b) !== false) + if($this->b !== false && strpos('(-+{[@', $this->b) !== false) { echo $this->a; $this->saveString(); @@ -239,7 +239,7 @@ class JShrink_Minifier if($this->a == '/' && ($this->b == '\'' || $this->b == '"')) { $this->saveRegex(); - continue; + continue 3; } echo $this->a;