diff --git a/src/Helper/Navigation/Links.php b/src/Helper/Navigation/Links.php index aababd3e..4d60b6e4 100644 --- a/src/Helper/Navigation/Links.php +++ b/src/Helper/Navigation/Links.php @@ -15,6 +15,7 @@ use Zend\Navigation\AbstractContainer; use Zend\Navigation\Page\AbstractPage; use Zend\Stdlib\ArrayUtils; +use Zend\Stdlib\ErrorHandler; use Zend\View; use Zend\View\Exception; @@ -127,7 +128,10 @@ public function __invoke($container = null) */ public function __call($method, array $arguments = array()) { - if (@preg_match('/find(Rel|Rev)(.+)/', $method, $match)) { + ErrorHandler::start(E_WARNING); + $result = preg_match('/find(Rel|Rev)(.+)/', $method, $match); + ErrorHandler::stop(); + if ($result) { return $this->findRelation($arguments[0], strtolower($match[1]), strtolower($match[2]));