From 38339acb3de57283a63a72b2febe43fef9411453 Mon Sep 17 00:00:00 2001 From: Raul Baldner junior Date: Tue, 31 Jul 2012 15:59:10 -0300 Subject: Fix warning by profiler when userdata has objects If session data has objects and profiler is enabled, a warning is trown: > A PHP Error was encountered > Severity: Warning > Message: htmlspecialchars() expects parameter 1 to be string, object given > Filename: libraries/Profiler.php > Line Number: 514 --- system/libraries/Profiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 082a5ee1d..0e0bde97f 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -506,7 +506,7 @@ class CI_Profiler { foreach ($this->CI->session->all_userdata() as $key => $val) { - if (is_array($val)) + if (is_array($val) || is_object($val)) { $val = print_r($val, TRUE); } -- cgit v1.2.3-24-g4f1b