Commit 47cfcee2 authored by Nigel McNie's avatar Nigel McNie
Browse files

Don't cause a warning if there are no values to check for being public.

parent 28972e00
......@@ -107,7 +107,7 @@ function pieform_element_viewacl_get_value(Pieform $form, $element) {
else if (isset($element['defaultvalue'])) {
$values = $element['defaultvalue'];
}
if (get_config('allowpublicviews') != '1') {
if (get_config('allowpublicviews') != '1' && $values) {
foreach ($values as $key => $value) {
if ($value['type'] == 'public') {
unset($values[$key]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment