isset insetad of array key exists
This commit is contained in:
@@ -152,13 +152,13 @@ class ActiveLinkHelper extends Helper {
|
|||||||
protected function _matchesUrlFromArrayTarget(array $current, array $targetUrl) {
|
protected function _matchesUrlFromArrayTarget(array $current, array $targetUrl) {
|
||||||
foreach ($targetUrl as $targetKey => $targetValue) {
|
foreach ($targetUrl as $targetKey => $targetValue) {
|
||||||
if (is_array($targetValue)) {
|
if (is_array($targetValue)) {
|
||||||
if (!in_array($current[$targetKey], $targetValue)) {
|
if (!isset($current[$targetKey]) || !in_array($current[$targetKey], $targetValue)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!array_key_exists($targetKey, $current) || $targetValue != $current[$targetKey]) {
|
if (!isset($targetKey, $current) || $targetValue != $current[$targetKey]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user