Permalink
Browse files

Prevent autoload when checking for the existence of HttpException

The class_exists check has been added in 4f29f58#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"
  • Loading branch information...
1 parent 94ff1b2 commit c6d8b477fc739d9e51114b8a18c59ac877a6c135 @real34 real34 committed May 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Error/exceptions.php
View
2 lib/Cake/Error/exceptions.php
@@ -63,7 +63,7 @@ public function responseHeader($header = null, $value = null) {
*
* @package Cake.Error
*/
-if (!class_exists('HttpException')) {
+if (!class_exists('HttpException', false)) {
class HttpException extends CakeBaseException {
}
}

0 comments on commit c6d8b47

Please sign in to comment.