Browse Source

Better error message if the configuration file exists but is not readable

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1413 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 years ago
parent
commit
e33840e740
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/config.class.inc.php

+ 4 - 0
core/config.class.inc.php

@@ -610,6 +610,10 @@ class Config
 		{
 			throw new ConfigException("Could not find $sPurpose file", array('file' => $sFileName));
 		}
+		if (!is_readable($sFileName))
+		{
+			throw new ConfigException("Could not read $sPurpose file (the file exists but cannot be read). Do you have the rights to access this file?", array('file' => $sFileName));			
+		}
 	}
 
 	protected function Load($sConfigFile)