File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2497,15 +2497,17 @@ public function canViewForRequest(): bool {
2497
2497
}
2498
2498
2499
2499
// Check plugins restrictions
2500
- foreach ($ PLUGIN_HOOKS ['formcreator_restrict_form ' ] as $ plugin => $ callable ) {
2501
- // Skip if invalid hook
2502
- if (!is_callable ($ callable )) {
2503
- trigger_error ("formcreator_restrict_form[ $ plugin]: not a callable " , E_USER_WARNING );
2504
- continue ;
2505
- }
2500
+ if (isset ($ PLUGIN_HOOKS ['formcreator_restrict_form ' ])) {
2501
+ foreach ($ PLUGIN_HOOKS ['formcreator_restrict_form ' ] as $ plugin => $ callable ) {
2502
+ // Skip if invalid hook
2503
+ if (!is_callable ($ callable )) {
2504
+ trigger_error ("formcreator_restrict_form[ $ plugin]: not a callable " , E_USER_WARNING );
2505
+ continue ;
2506
+ }
2506
2507
2507
- if (!call_user_func ($ callable , $ this )) {
2508
- return false ;
2508
+ if (!call_user_func ($ callable , $ this )) {
2509
+ return false ;
2510
+ }
2509
2511
}
2510
2512
}
2511
2513
You can’t perform that action at this time.
0 commit comments