Optimize get_instance() calls/assignments
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 4bb94a2..7a6df54 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -49,8 +49,7 @@
*/
function xss_clean($str, $is_image = FALSE)
{
- $CI =& get_instance();
- return $CI->security->xss_clean($str, $is_image);
+ return get_instance()->security->xss_clean($str, $is_image);
}
}
@@ -66,8 +65,7 @@
*/
function sanitize_filename($filename)
{
- $CI =& get_instance();
- return $CI->security->sanitize_filename($filename);
+ return get_instance()->security->sanitize_filename($filename);
}
}
@@ -107,8 +105,7 @@
*/
function strip_image_tags($str)
{
- $CI =& get_instance();
- return $CI->security->strip_image_tags($str);
+ return get_instance()->security->strip_image_tags($str);
}
}