Skip to content

Commit 2ac7840

Browse files
authored
Update ResultPlugin.php
1 parent 1850a60 commit 2ac7840

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Model/Controller/ResultPlugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function aroundRenderResult(
6969
$i = 0;
7070
while (false !== ($start = stripos($html, $startTag, $start))) {
7171
$i++;
72-
if ($i > 1000 ) {
72+
if ($i > 1000) {
7373
return $result;
7474
}
7575

@@ -91,7 +91,8 @@ public function aroundRenderResult(
9191
}
9292

9393
$scripts = implode(PHP_EOL, $scripts);
94-
if ($end = stripos($html, '</body>')) {
94+
$end = stripos($html, '</body>');
95+
if ($end !== false) {
9596
$html = substr($html, 0, $end) . $scripts . substr($html, $end);
9697
} else {
9798
$html .= $scripts;

0 commit comments

Comments
 (0)