News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Error in jdcategoryselect.php

Started by Francesco Rotondo, 12.12.2016 17:21:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Francesco Rotondo

Hi.

At line 102 of this file there is this code:           if ($options[$i]->level == 0) {
                if ($jd_config['show.header.catlist.uncategorised'] == 1){
                    $options[$i]->text = JText::_('COM_JDOWNLOADS_SELECT_UNCATEGORISED');
                } else {
                   $root = array_shift($options);
                   $i++;
                   $n--;
                }   
            }
            if ($options[$i]->level > 1){
                   $options[$i]->text = str_repeat('- ',($options[$i]->level -1)).$options[$i]->text;
            }
.
i had a error of 'undefinited error' at line 102. With this change, no error:            if ($options[$i]->level == 0) {
                if ($jd_config['show.header.catlist.uncategorised'] == 1){
                    $options[$i]->text = JText::_('COM_JDOWNLOADS_SELECT_UNCATEGORISED');
                } else {
                   $root = array_shift($options);
                   $i++;
                   $n--;
                }   
            }
if ($i < $n) {
                if ($options[$i]->level > 1){
                   $options[$i]->text = str_repeat('- ',($options[$i]->level -1)).$options[$i]->text;
                }
            }.
Of course, there can be another better solution at this error than mine.
  •  

ColinM

Hi
Thanks for pointing this out.
What Error Reporting level have you set in Joomla! Global Config - Server Settings?  We normally run at System Default.  If you use Development level you get very strict dfeinitions that are above thge usual php 'default' behavior.
Colin
Colin M
  •