summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Output.php')
-rwxr-xr-xsystem/core/Output.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 69a2e5f88..d27133d37 100755
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -396,8 +396,9 @@ class CI_Output {
// If the output data contains closing </body> and </html> tags
// we will remove them and add them back after we insert the profile data
- $output = preg_replace('|</body>.*?</html>|is', '', $output, $count).$CI->profiler->run();
- if (isset($count) && $count > 0)
+ $count = 0;
+ $output = preg_replace('|</body>.*?</html>|is', '', $output, -1, $count).$CI->profiler->run();
+ if ($count > 0)
{
$output .= '</body></html>';
}