[-] FO : fixed bad condition in the dispatcher rules

This commit is contained in:
Damien Metzger
2013-07-09 10:52:50 +02:00
parent c0c6c10bba
commit 00425a4c1a
+1 -1
View File
@@ -534,7 +534,7 @@ class DispatcherCore
*/
public function hasKeyword($route_id, $id_lang, $keyword)
{
if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id]))
if (!isset($this->routes[$id_lang]) || !isset($this->routes[$id_lang][$route_id]))
return false;
return preg_match('#\{([^{}]*:)?'.preg_quote($keyword, '#').'(:[^{}]*)?\}#', $this->routes[$id_lang][$route_id]['rule']);