Hi,
I am getting an Undefined Index in a perch core file, as follows:
Notice: Undefined index: label in /home/user/public_html/perch/core/apps/content/modes/page.edit.post.php on line 129
PHP
- <div class="field-wrap">
- <?php echo $Form->label('pageAttributeTemplate', 'Attribute template'); ?>
- <div class="form-entry">
- <?php
- $templates = $Regions->get_templates(PERCH_TEMPLATE_PATH.'/pages/attributes');
- $opts = array();
- if (PerchUtil::count($templates)) {
- foreach($templates as $group_name=>$group) {
- $tmp = array();
- $group = PerchUtil::array_sort($group, 'label');
- foreach($group as $file) {
- $tmp[] = array('label'=>$file['label'], 'value'=>$file['path']);
- }
- $opts[$group_name] = $tmp;
- }
- }
- echo $Form->grouped_select('pageAttributeTemplate', $opts, $Form->get($details, 'pageAttributeTemplate'));
- ?>
- </div>
- </div>
PHP version 7.4 with Perch 3.1.7