jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: maurofon on 25.07.2016 17:15:58

Title: error: Undefined variable [solved]
Post by: maurofon on 25.07.2016 17:15:58
Hello , I apologize me for my bad English . From qualhe day Users of my site , when carrying a dowload it, see for a Second THIS TEXT :
Notice : undefined variable: user random_id in
com_jdownload / helpers / jdownloadeshelper.php on line 3418.


This does not mean anything, the component works well but I do not understand this error message that apparae for a moment .
http://www.podisticatorino.it/index.php/archivio/classifiche

[gelöscht durch Administrator]
Title: Re: error: Undefined variable
Post by: ColinM on 25.07.2016 18:26:36
Hi,
I think you have your error reporting in Joomla! Global Configuration - Server Settings set too high.  You only need it set to System Default.
To explain for example with user_random_id variable it is used in a php statement of the form
if ($may_download === true){
            if ($user_random_id){   
                JDHelper::writeSessionEncoded($user_random_id, 'jd_random_id');

Now it is perfectly good and permissible php to test on an undefined variable as it will return  a 'FALSE' state.  But at high levels of error reporting this is picked up as a potential error as sometimes it is a real error, but not in the cases shown in your error reports appearing on user sites.

Colin
Title: Re: error: Undefined variable
Post by: maurofon on 25.07.2016 21:43:44
Thank you, the problem was just that. Thanks again