File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -524,17 +524,19 @@ public function page($all = false) {
524
524
}
525
525
526
526
// 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 ' );
534
539
}
535
- }
536
- if ($ found === false ) {
537
- throw new \Exception ('Permission denied ' );
538
540
}
539
541
}
540
542
You can’t perform that action at this time.
0 commit comments