summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Loader.php16
-rw-r--r--system/core/Output.php2
-rw-r--r--system/core/Security.php2
-rw-r--r--system/helpers/form_helper.php7
-rw-r--r--system/libraries/Pagination.php3
5 files changed, 21 insertions, 9 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 2eef9979c..70c1e4154 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -415,7 +415,7 @@ class CI_Loader {
* to be extracted for use in the view
* @param bool $return Whether to return the view output
* or leave it to the Output class
- * @return void
+ * @return void|string
*/
public function view($view, $vars = array(), $return = FALSE)
{
@@ -471,6 +471,20 @@ class CI_Loader {
// --------------------------------------------------------------------
/**
+ * Clear Cached Variables
+ *
+ * Clears the cached variables.
+ *
+ * @return void
+ */
+ public function clear_vars()
+ {
+ $this->_ci_cached_vars = array();
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Get Variable
*
* Check if a variable is set and retrieve it.
diff --git a/system/core/Output.php b/system/core/Output.php
index 7a5fb66f6..04209d920 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -847,7 +847,7 @@ class CI_Output {
}
// Remove CSS comments
- $output = preg_replace('!/\*([^/][^*]*\*)*/(?!.+?["\'])!i', '', $output);
+ $output = preg_replace('@/\*([^/][^*]*\*)*/(?!.+?["\'])@i', '', $output);
// Remove Javascript inline comments
if ($has_tags === TRUE && strpos(strtolower($open_tag), 'script') !== FALSE)
diff --git a/system/core/Security.php b/system/core/Security.php
index 70cf3e013..368e17dc3 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -603,7 +603,7 @@ class CI_Security {
*/
public function strip_image_tags($str)
{
- return preg_replace(array('#<img\s+.*?src\s*=\s*["\'](.+?)["\'].*?\>#', '#<img\s+.*?src\s*=\s*(.+?).*?\>#'), '\\1', $str);
+ return preg_replace(array('#<img[\s/]+.*?src\s*=\s*["\'](.+?)["\'].*?\>#', '#<img[\s/]+.*?src\s*=\s*(.+?).*?\>#'), '\\1', $str);
}
// ----------------------------------------------------------------
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 0cc5bd157..85f1f4e01 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -328,11 +328,8 @@ if ( ! function_exists('form_dropdown'))
{
$selected = array($_POST[$name]);
}
-
- if ($extra != '')
- {
- $extra = ' '.$extra;
- }
+
+ $extra = _attributes_to_string($extra);
$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 10fb29dbd..c6ffd03d4 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -354,7 +354,8 @@ class CI_Pagination {
public function create_links()
{
// If our item count or per-page total is zero there is no need to continue.
- if ($this->total_rows === 0 OR $this->per_page === 0)
+ // Note: DO NOT change the operator to === here!
+ if ($this->total_rows == 0 OR $this->per_page == 0)
{
return '';
}