mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
minor refactor for file_exists checks.
This commit is contained in:
parent
24448775c2
commit
ef23ecfe07
1 changed files with 1 additions and 1 deletions
|
@ -854,7 +854,7 @@ class View extends Object {
|
|||
foreach ($paths as $path) {
|
||||
if (file_exists($path . $name . $this->ext)) {
|
||||
return $path . $name . $this->ext;
|
||||
} elseif (file_exists($path . $name . '.ctp')) {
|
||||
} elseif ($this->ext != '.ctp' && file_exists($path . $name . '.ctp')) {
|
||||
return $path . $name . '.ctp';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue