diff options
Diffstat (limited to 'system/core/Output.php')
-rwxr-xr-x | system/core/Output.php | 5 |
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>'; } |