Page 1 of 1
Error: Creating default object from empty value
Posted: 06 Jan 2013, 21:30
by arwi
Hi,
Phoca download is a great component.
However, since switching to php 5.4.10 from php 5.2 (Joomla 2.1.8, phoca download 2.1.

I get the following error message when trying to upload a file from the frontend:
Code: Select all
Warning: Creating default object from empty value in /homepages/12/d30400693/htdocs/joomla/j25/administrator/components/com_phocadownload/helpers/phocadownload.php on line 191
Has anyone experienced this problem, too or knows how to solve it?
Any help appreciated.
Regards
Arnd
Re: Error: Creating default object from empty value
Posted: 15 Jan 2013, 01:13
by Jan
Hi, I will change it for next release (the code is older than new changes in PHP).
For now you can quick fix it if you will define the object, add before line 191:
$variable = new StdClass(); (you need to set the right variable which caused the problem)
Jan
Re: Error: Creating default object from empty value
Posted: 15 Jan 2013, 04:16
by hochrheinwebservice
I do the 'quick fix' and there is no error massage!
But the new problem is, i can't now choose any category? Before the 'quick fix', i can choose all!
Any Idea? THX
Re: Error: Creating default object from empty value
Posted: 18 Jan 2013, 00:13
by Jan
Hi, do you get some error message?, did you add it to right place (e.g. before foreach to not reset the values every time the loop is done)
Jan
Re: Error: Creating default object from empty value
Posted: 20 Jan 2013, 15:41
by arwi
Hi Jan,
my Java knowlwdge is nearly non-existing.
I have tried to insert the suggested statement (using the variable name which is likely to cause the error) but the error is still there (only the line number of the error has increased due to the new statement.
I have inserted the statement before the loop.
Any help appreciated.
Thanks!
Arnd.
Re: Error: Creating default object from empty value
Posted: 08 Feb 2013, 20:10
by adular
Hi
I have the same problem
"Warning: Creating default object from empty value in /homepages/.../administrator/components/com_phocadownload/helpers/phocadownload.php on line 191"
Joomla Version 2.5.8 Stable
Phoca Download Version 2.1.8
Re: Error: Creating default object from empty value
Posted: 13 Feb 2013, 20:04
by Jan
Hi, thank you for the info, I will change the behaviour of next version of Phoca Download so it will work without warnings under php5.4
Jan
Re: Error: Creating default object from empty value
Posted: 27 Apr 2013, 17:11
by Jan
Hi, fixed in 2.1.9
Jan