浏览代码

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 年之前
父节点
当前提交
e33840e740
共有 1 个文件被更改,包括 4 次插入0 次删除
  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));
 			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)
 	protected function Load($sConfigFile)