TinyPortal

Development => Support => Topic started by: ~FS~grizz on April 26, 2011, 03:16:29 AM

Title: TP undefined Index error
Post by: ~FS~grizz on April 26, 2011, 03:16:29 AM
Link to my site: http://www.forgotten-soldiers.com
SMF version: SMF ver. 2.0 RC5
TP version: TP ver. 1.0 RC1
Default Forum Language: English
Theme name and version: IceCube
Browser Name and Version:   Firefox/3.6.16
Mods installed: Donations Pro, Member Awards, Autorefresh Who Index, LEET mod, Users online today, PM to member groups, Team Page, Google Member Map, SMF Arcade, Foxy for Aeva Media, Aeva Media, Tiny Portal
Related Error messages: Notice: Undefined index: show_download in /home/forgot32/public_html/Sources/TPSubs.php on line 201

I have just updated to Donations Pro, which is working properly with no errors.
When testing the settings it produces a page that says at top the error message I am asking about.
I looked at file referred to, it is line indicating setetting for TP Modules - Downloads
I do not know what could be wrong or what an undefined index there would look like.

here is the line:
if($context['TPortal']['show_download']==1)
$buts['downloads'] = array(
'title' => $txt['tp-downloads'],
'href' => $scripturl . '?action=tpmod;dl',
'show' => true,
'active_button' => false,
'sub_buttons' => array(
),
);


I don't know what could be wrong, but I have checked TP Downloads settings and could not see anything obvious.
Title: Re: TP undefined Index error
Post by: IchBin on April 26, 2011, 03:32:04 AM
Yeah this is a bug that is fixed in the next version. You should be able to change this line:
if($context['TPortal']['show_download']==1)

To this instead:
if(!empty($context['TPortal']['show_download']))
Title: Re: TP undefined Index error
Post by: ~FS~grizz on April 27, 2011, 12:48:45 AM
thanks!
that was perfect.