(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)
This commit is contained in:
plegall
2019-10-14 12:31:28 +02:00
parent e49c217441
commit 9b695da86b

View File

@@ -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;