mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Refactoring PhpReader::read() to check for .php file first. Fixed error when there's a directory with the same name.
This commit is contained in:
parent
e47b970811
commit
f0d10b4d69
1 changed files with 4 additions and 4 deletions
|
@ -72,10 +72,10 @@ class PhpReader implements ConfigReaderInterface {
|
|||
} else {
|
||||
$file = $this->_path . $key;
|
||||
}
|
||||
if (!file_exists($file)) {
|
||||
$file .= '.php';
|
||||
if (!file_exists($file)) {
|
||||
throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
|
||||
if (!is_file($file)) {
|
||||
if (!is_file(substr($file, 0, -4))) {
|
||||
throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', $file, substr($file, 0, -4)));
|
||||
}
|
||||
}
|
||||
include $file;
|
||||
|
|
Loading…
Add table
Reference in a new issue