Skip to content

Commit

Permalink
Add file_exists check.
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbitron committed Apr 26, 2013
1 parent cb62ba6 commit 97fe61d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chrome_logger_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
*/
function chrome_log($object, $type = 'log')
{
if(!file_exists(APPPATH .'third_party/ChromePhp.php')){
echo 'Missing required file: third_party/ChromePhp.php';
return;
}

require_once APPPATH .'third_party/ChromePhp.php';
if($type == 'warn') ChromePhp::warn($object);
else if($type == 'error') ChromePhp::error($object);
Expand Down

0 comments on commit 97fe61d

Please sign in to comment.