Skip to content

Commit

Permalink
Show error message if config file is not readable
Browse files Browse the repository at this point in the history
* when the config file is not writable there is a error message shown
* same happens now if the config file is not readable
* fixes #180
  • Loading branch information
MorrisJobke committed Jun 21, 2016
1 parent b4df57f commit 191a6c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/private/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ private function readData() {

// Include file and merge config
foreach ($configFiles as $file) {
$filePointer = file_exists($file) ? fopen($file, 'r') : false;
$fileExistsAndIsReadable = file_exists($file) && is_readable($file);
$filePointer = $fileExistsAndIsReadable ? fopen($file, 'r') : false;
if($file === $this->configFilePath &&
$filePointer === false &&
@!file_exists($this->configFilePath)) {
$filePointer === false) {
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
continue;
Expand Down

0 comments on commit 191a6c6

Please sign in to comment.