summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-23 18:21:00 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-23 18:21:00 +0200
commit7a744a8ba8f07ba1ec3a48f1d5de641b4025ce20 (patch)
treed41a96e51eff496a86262e0bfa810436622375ba /system/core
parentf82b92999e8309155df3e665e25a261c26b0e93d (diff)
If there is no output then no need to try minifying it
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Output.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 4fdf18f14..5ec8c4bc0 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -625,6 +625,11 @@ class CI_Output {
$size_before = strlen($output);
+ if ($size_before === 0)
+ {
+ return '';
+ }
+
// Find all the <pre>,<code>,<textarea>, and <javascript> tags
// We'll want to return them to this unprocessed state later.
preg_match_all('{<pre.+</pre>}msU', $output, $pres_clean);