From 3e414f9f72e387449d9e3984e1869b386564deaf Mon Sep 17 00:00:00 2001 From: Chris Muench Date: Sun, 16 Oct 2011 23:03:55 -0400 Subject: Check for string value before doing str_replace. (Issue #439) --- system/libraries/Session.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session.php b/system/libraries/Session.php index dd951c325..867314bf9 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -749,7 +749,10 @@ class CI_Session { */ function _unescape_slashes(&$val, $key) { - $val= str_replace('{{slash}}', '\\', $val); + if (is_string($val)) + { + $val= str_replace('{{slash}}', '\\', $val); + } } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b