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:
Pierre Martin 2013-05-08 13:25:42 +03:00
parent 94ff1b20e2
commit c6d8b477fc

View file

@ -63,7 +63,7 @@ class CakeBaseException extends RuntimeException {
*
* @package Cake.Error
*/
if (!class_exists('HttpException')) {
if (!class_exists('HttpException', false)) {
class HttpException extends CakeBaseException {
}
}