Skip to content

Commit

Permalink
Add check for logging being enabled but log file not existing yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Netrilix committed Jul 15, 2016
1 parent 6824954 commit 7ed597b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v0.3.1.18

-
- Add check for logging being enabled but log file not existing yet

## v0.3.1.17

Expand Down
3 changes: 3 additions & 0 deletions userfrosting/models/database/SiteSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ static public function getLog($targetLines = null, $seekLen = 4096){
if (!ini_get("log_errors")){
$path = ini_get('error_log');
$messages = ["Error logging appears to be disabled. Please check your php.ini file."];
} else if (!file_exists(ini_get('error_log'))){
$path = ini_get('error_log');
$messages = ["Log file not found. If you haven't generated any errors, this is fine. If you were expecting to see errors here, please check your php.ini file."];
} else {
$path = ini_get('error_log');
@$file = file($path);
Expand Down

0 comments on commit 7ed597b

Please sign in to comment.