From 31484d8633dee02ba4eff0adcf16bcd4e3842cd3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 16 Aug 2015 12:09:31 +0200 Subject: [PATCH] Prevent fatal error caused by empty categories --- com.woltlab.wcf/templates/settings.tpl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/com.woltlab.wcf/templates/settings.tpl b/com.woltlab.wcf/templates/settings.tpl index 17ca02b2a1..960b7ab2f8 100644 --- a/com.woltlab.wcf/templates/settings.tpl +++ b/com.woltlab.wcf/templates/settings.tpl @@ -110,13 +110,15 @@ {/if} {/if} - {foreach from=$optionTree[0][categories][0][categories] item=optionCategory} -
- {lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang} - - {include file='userProfileOptionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'} -
- {/foreach} + {if !$optionTree|empty} + {foreach from=$optionTree[0][categories][0][categories] item=optionCategory} +
+ {lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang} + + {include file='userProfileOptionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'} +
+ {/foreach} + {/if} {event name='fieldsets'} -- 2.20.1