Permalink
Browse files

Using the `Filters` class to lazily apply error-trapping filters to s…

…tatic classes.
  • Loading branch information...
1 parent b638990 commit e0223e1205a4971aa54a9b19d653f66368fef008 @nateabele nateabele committed Feb 15, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 libraries/lithium/core/ErrorHandler.php
View
6 libraries/lithium/core/ErrorHandler.php
@@ -9,8 +9,8 @@
namespace lithium\core;
use Exception;
-use lithium\util\Collection;
-use lithium\core\Environment;
+use ErrorException;
+use lithium\util\collection\Filters;
/**
* The `ErrorHandler` class allows PHP errors and exceptions to be handled in a uniform way. Using
@@ -271,7 +271,7 @@ public static function apply($class, $method, array $conditions, $handler) {
};
if (is_string($class)) {
- $class::applyFilter($method, $filter);
+ Filters::apply($class, $method, $filter);
} else {
$class->applyFilter($method, $filter);
}

0 comments on commit e0223e1

Please sign in to comment.