ccampbell / chromephp

class for logging PHP variables to Google Chrome console
http://www.chromelogger.com
1.38k stars 450 forks source link

special variable Resource givin' SyntaxError #62

Open danielcatao opened 7 years ago

danielcatao commented 7 years ago

I'm getting the error below when I try to Chrome::log() a mysql_query result:

Error in event handler for runtime.onMessage: SyntaxError: Unexpected end of JSON input at _decode (chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:156:21) at _process (chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:164:26) at _handleHeaderUpdate (chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:181:9)

*if I use mysql_fetch_array before Chrome::log() the error disappear.

Suggestion: Add if(is_resource($object)){return get_resource_type($object);} to ChromePHP::_convert()