chromelogger
chromelogger copied to clipboard
Addslashes to REQUEST_URI
I have the message : Warning: json_encode(): type is unsupported, encoded as null in C:\www\site\lib\chromephp\ChromePhp.php on line 396
Line 131, replace : $this->_json['request_uri'] = $_SERVER['REQUEST_URI']; With : $this->_json['request_uri'] = addslashes($_SERVER['REQUEST_URI']);
Ah interesting. Really I should be using json_encode
. I think I will probably just remove this completely though as it is not used by anything.
This also causes an error when run from the cli. I use a filter in Laravel to capture SQL queries and output them with Chrome Logger. When running a migration or seeder from the cli, I get an error because the $_SERVER['REQUEST_URI'] index doesn't exist. Temp fix:
$this->_json['request_uri'] = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : 'cli://';