Warning: Creating default object from empty value

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
cappleby
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Fri Oct 10, 2008 5:18 am

Warning: Creating default object from empty value

Post by cappleby » Mon Jul 21, 2014 7:00 pm

My site has recently been upgraded to php5.4 and I began getting warning messages. I've gone back to php5.2 but the warnings keep appearing. In any case the site needs to be upgraded as php5.2 is going. The warnings say:
Warning: Creating default object from empty value in /home/efac/efac.org.au/plugins/system/blueflame/bfCache.php on line 69

Warning: Creating default object from empty value in /home/efac/efac.org.au/plugins/system/blueflame/bfUser.php on line 32

The code at those points is:
cache.php from line 61:
if (! isset ( $instances [$component] )) {
$c = __CLASS__;
$instances [$component] = new $c ( $component );
$config = & bfConfig::getInstance ( $component );

if (@$config->bfCachingEnabled == "1") {
$instances [$component]->cache_enabled = true;
}

$instance->expiration_time = @$config->cachetime;
}
bfUser.php from line 30:
public static function getInstance ($user_id = null)
{
$my = JFactory::getUser();
$user->_my = $my;
return $user->_my;
}

I hear that J2.5 requires explicit error checking?
Can someone help me with the way to overcome this warning please.
Chris A
Chris A
Melbourne, Australia

cappleby
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Fri Oct 10, 2008 5:18 am

Re: Warning: Creating default object from empty value

Post by cappleby » Tue Aug 05, 2014 6:10 am

I've overcome the symptom by turning off error reporting but I'm not sure that's the best solution. Any thoughts?
Chris A
Melbourne, Australia

User avatar
jackrabbit
Joomla! Ace
Joomla! Ace
Posts: 1473
Joined: Thu May 21, 2009 3:12 am
Location: Florida
Contact:

Re: Warning: Creating default object from empty value

Post by jackrabbit » Tue Aug 05, 2014 3:02 pm

PHP 5.4 has loads of strict standards and as such, multiple error messages are displayed for many php applications so it is not isolated to Joomla. The only thing to do is allow time for extension developers to release updates with the new coding standards.

Otherwise, your website is fine.
Reset Joomla super user password and username simply | http://cmsenergizer.com/website-energy- ... d-remotely

cappleby
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Fri Oct 10, 2008 5:18 am

Re: Warning: Creating default object from empty value

Post by cappleby » Tue Aug 05, 2014 4:18 pm

Hi Jack, I thought that was the case. Unfortunately the developer has decided not to continue developing Blueflame Forms. It's also the best forms software by a long way so I don't want to change to any of the others. (See separate thread re BfForms). If you have any suggestions on how to stop this error I'd appreciate it.
Chris A
Melbourne, Australia

User avatar
jackrabbit
Joomla! Ace
Joomla! Ace
Posts: 1473
Joined: Thu May 21, 2009 3:12 am
Location: Florida
Contact:

Re: Warning: Creating default object from empty value

Post by jackrabbit » Tue Aug 05, 2014 8:21 pm

You can bring it up to standards with some research. For all the lines of error reported, you can go knocking on the doors of php coding forums and especially the home of stackoverflow.com. You just have to be absolutely clear with your inquiry. If it is even slightly vague, they will put it in the trash.

Others have already had, researched and asked about the same error msg
http://stackoverflow.com/questions/1480 ... ing-in-php
http://stackoverflow.com/questions/8900 ... lue-in-php
https://www.google.com/search?q=Warning ... channel=sb
Reset Joomla super user password and username simply | http://cmsenergizer.com/website-energy- ... d-remotely

cappleby
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Fri Oct 10, 2008 5:18 am

Re: Warning: Creating default object from empty value

Post by cappleby » Wed Aug 06, 2014 7:39 am

Thanks. I'll see what I can work out from that.
Chris A
Melbourne, Australia


Locked

Return to “Administration Joomla! 2.5”