Profiler doesn't account for object in config #804

Closed
ayz-danielsmith opened this Issue Dec 20, 2011 · 2 comments

Comments

Projects
None yet
3 participants

Error

A PHP Error was encountered Severity: Warning Message: htmlspecialchars() expects parameter 1 to be string, object given Filename: libraries/Profiler.php Line Number: 456

Fix

Add is_object to the conditional so that it prints the object as a string the same way it does for arrays.

if (is_array($val) || is_object($val)) { $val = print_r($val, TRUE); }

Thanks for this post. At least I was able to create a MY_Profiler class that extends the core version with your fix. Yes, just a warning but not optimal nor is the warning appealing when developing.

Contributor

narfbg commented Mar 1, 2012

Resolved: 963386b

@narfbg narfbg closed this Mar 1, 2012

baypup pushed a commit to baypup/CodeIgniter that referenced this issue Aug 20, 2015

baypup pushed a commit to baypup/CodeIgniter that referenced this issue Aug 20, 2015

baypup pushed a commit to baypup/CodeIgniter that referenced this issue Aug 20, 2015

baypup pushed a commit to baypup/CodeIgniter that referenced this issue Aug 20, 2015

Merge pull request #816 from Tjoosten/patch-1
#804: fixing missing column type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment