mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Changed the order of the include for the custom reporter and added file_exists() to prevent errors.
This commit is contained in:
parent
534291a1a6
commit
69ba1965b8
1 changed files with 3 additions and 3 deletions
|
@ -184,10 +184,10 @@ class CakeTestSuiteDispatcher {
|
||||||
|
|
||||||
$appClass = $this->params['output'] . 'Reporter';
|
$appClass = $this->params['output'] . 'Reporter';
|
||||||
$appFile = APPLIBS . 'test_suite' . DS . 'reporter' . DS . $type . '_reporter.php';
|
$appFile = APPLIBS . 'test_suite' . DS . 'reporter' . DS . $type . '_reporter.php';
|
||||||
if (include_once $coreFile) {
|
if (file_exists($appFile) && include_once $appFile) {
|
||||||
$Reporter =& new $coreClass(null, $this->params);
|
|
||||||
} elseif (include_once $appFile) {
|
|
||||||
$Reporter =& new $appClass(null, $this->params);
|
$Reporter =& new $appClass(null, $this->params);
|
||||||
|
} elseif (include_once $coreFile) {
|
||||||
|
$Reporter =& new $coreClass(null, $this->params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $Reporter;
|
return $Reporter;
|
||||||
|
|
Loading…
Add table
Reference in a new issue