Skip to content

Commit

Permalink
Fixed a possible unknown index introduced in v3.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
LionelLaffineur committed Aug 1, 2023
1 parent b81bb06 commit 22199f2
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/Skeleton/Pager/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,17 +524,19 @@ public function page($all = false) {
}

// Check if all the condition restrictions are fulfulled
foreach ($this->options['conditions_restrictions'] as $condition_restriction) {
$found = false;
foreach ($this->get_conditions() as $condition) {
$condition = array_shift($condition);
if ($condition->equals($condition_restriction)) {
$found = true;
break;
if (isset($this->options['conditions_restrictions'])) {
foreach ($this->options['conditions_restrictions'] as $condition_restriction) {
$found = false;
foreach ($this->get_conditions() as $condition) {
$condition = array_shift($condition);
if ($condition->equals($condition_restriction)) {
$found = true;
break;
}
}
if ($found === false) {
throw new \Exception('Permission denied');
}
}
if ($found === false) {
throw new \Exception('Permission denied');
}
}

Expand Down

0 comments on commit 22199f2

Please sign in to comment.