Skip to content

Commit 2125405

Browse files
authored
Merge pull request #78 from morozov/issues/71
Fixed test failures on PHP 7.3
2 parents 83da59b + 9110581 commit 2125405

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/.idea
2+
/.php_cs.cache
23
/.settings
34
/.buildpath
45
/.project
56
/composer.lock
67
/vendor
78
/report
8-
/build
9+
/build

src/JShrink/Minifier.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function loop()
183183
// new lines
184184
case "\n":
185185
// if the next line is something that can't stand alone preserve the newline
186-
if (strpos('(-+[@', $this->b) !== false) {
186+
if ($this->b !== false && strpos('(-+[@', $this->b) !== false) {
187187
echo $this->a;
188188
$this->saveString();
189189
break;
@@ -231,7 +231,7 @@ protected function loop()
231231
// check for some regex that breaks stuff
232232
if ($this->a === '/' && ($this->b === '\'' || $this->b === '"')) {
233233
$this->saveRegex();
234-
continue;
234+
continue 3;
235235
}
236236

237237
echo $this->a;

0 commit comments

Comments
 (0)