mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Prevent autoload when checking for the existence of HttpException
The class_exists check has been added in 4f29f58a5e (L1R28)
to prevent a side effect with a PECL extension.
However if an autoloader such as the Composer one is loaded, it will try to require this `exceptions.php` file again:
```
'HttpException' => $vendorDir . '/pear-pear.cakephp.org/CakePHP/Cake/Error/exceptions.php',
```
this will result in a "Fatal error: Cannot redeclare class CakeBaseException"
This commit is contained in:
parent
94ff1b20e2
commit
c6d8b477fc
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class CakeBaseException extends RuntimeException {
|
|||
*
|
||||
* @package Cake.Error
|
||||
*/
|
||||
if (!class_exists('HttpException')) {
|
||||
if (!class_exists('HttpException', false)) {
|
||||
class HttpException extends CakeBaseException {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue