diff options
author | Andrew Podner <a.podner@me.com> | 2012-12-19 01:37:22 +0100 |
---|---|---|
committer | Andrew Podner <a.podner@me.com> | 2012-12-19 01:37:22 +0100 |
commit | 9dfceda245c7833edd3311ed0e5e5704db34e847 (patch) | |
tree | 2041a57ee91b999fce028140c0e74b9e2a88e9a8 | |
parent | 9a171a0f7120e61e8bed44abda4930c5d8eeb256 (diff) |
fixes #2078: changing type variable to boolean in protected method
-rw-r--r-- | system/core/Output.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/core/Output.php b/system/core/Output.php index 3a94d97e1..2793d4132 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -728,13 +728,13 @@ class CI_Output { preg_match_all('{<style.+</style>}msU', $output, $style_clean); foreach ($style_clean[0] as $s) { - $output = str_replace($s, $this->_minify_script_style($s, $type), $output); + $output = str_replace($s, $this->_minify_script_style($s, TRUE), $output); } // Minify the javascript in <script> tags. foreach ($javascript_clean[0] as $s) { - $javascript_mini[] = $this->_minify_script_style($s, $type); + $javascript_mini[] = $this->_minify_script_style($s, TRUE); } // Replace multiple spaces with a single space. @@ -782,7 +782,7 @@ class CI_Output { case 'text/css': case 'text/javascript': - $output = $this->_minify_script_style($output, $type); + $output = $this->_minify_script_style($output); break; @@ -806,13 +806,13 @@ class CI_Output { * the tags and any associated properties if tags are present * * @param string $output Output to minify - * @param string $type Output content MIME type + * @param bool $has_tags specify if the output has style or script tags * @return string Minified output */ - protected function _minify_script_style($output, $type = 'text/html') + protected function _minify_script_style($output, $has_tags = FALSE) { // We only need this if there are tags in the file - if ($type == 'text/html') + if ($has_tags === TRUE) { // Remove opening tag and save for later $pos = strpos($output, '>'); |