Skip to content

Commit 22199f2

Browse files
Fixed a possible unknown index introduced in v3.0.5
1 parent b81bb06 commit 22199f2

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

lib/Skeleton/Pager/Pager.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -524,17 +524,19 @@ public function page($all = false) {
524524
}
525525

526526
// Check if all the condition restrictions are fulfulled
527-
foreach ($this->options['conditions_restrictions'] as $condition_restriction) {
528-
$found = false;
529-
foreach ($this->get_conditions() as $condition) {
530-
$condition = array_shift($condition);
531-
if ($condition->equals($condition_restriction)) {
532-
$found = true;
533-
break;
527+
if (isset($this->options['conditions_restrictions'])) {
528+
foreach ($this->options['conditions_restrictions'] as $condition_restriction) {
529+
$found = false;
530+
foreach ($this->get_conditions() as $condition) {
531+
$condition = array_shift($condition);
532+
if ($condition->equals($condition_restriction)) {
533+
$found = true;
534+
break;
535+
}
536+
}
537+
if ($found === false) {
538+
throw new \Exception('Permission denied');
534539
}
535-
}
536-
if ($found === false) {
537-
throw new \Exception('Permission denied');
538540
}
539541
}
540542

0 commit comments

Comments
 (0)