diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d26952c..9d4fcf4b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v0.3.1.18 + +- Add check for logging being enabled but log file not existing yet + ## v0.3.1.17 - Fix occasional bug when end-of-file is reached on log file before requested number of lines is reached diff --git a/userfrosting/initialize.php b/userfrosting/initialize.php index 07e8e64de..9fa2dfb3b 100644 --- a/userfrosting/initialize.php +++ b/userfrosting/initialize.php @@ -147,7 +147,7 @@ 'guest_theme' => 'default', 'minify_css' => '0', 'minify_js' => '0', - 'version' => '0.3.1.17', + 'version' => '0.3.1.18', 'author' => 'Alex Weissman', 'show_terms_on_register' => '1', 'site_location' => 'The State of Indiana' diff --git a/userfrosting/models/database/SiteSettings.php b/userfrosting/models/database/SiteSettings.php index dec764535..756af84cd 100644 --- a/userfrosting/models/database/SiteSettings.php +++ b/userfrosting/models/database/SiteSettings.php @@ -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);