Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.0beta1, 4.0.0rc1
-
None
Description
If ShowAccessDeniedReason is enabled and a page without access will be entered a PHP warning will be shown:
Warning: Invalid argument supplied for foreach() in /home/dis/dev/ezpublish/trunk/kernel/error/view.php <code> Patch to fix this: <code> Index: kernel/error/view.php =================================================================== --- kernel/error/view.php (revision 20915) +++ kernel/error/view.php (working copy) @@ -165,8 +165,11 @@ $accessMessage .= " PolicyID : " . $policy['PolicyID'] . "\n" ; $accessMessage .= " Limitation : " . $policy['LimitationList']['Limitation'] . "\n" ; $accessMessage .= " Required : "; - foreach ( $policy['LimitationList']['Required'] as $required ) - $accessMessage .= "$required, "; + if ( isset( $policy['LimitationList']['Required'] ) ) + { + foreach ( $policy['LimitationList']['Required'] as $required ) + $accessMessage .= "$required, "; + } $accessMessage .= "\n"; } }
Attachments
Issue Links
- is duplicated by
-
EZP-11403 php warning in kernel/error/view.php
- Closed