Keyword

Warning: Creating default object from empty value

  • kbonne
  • kbonne's Avatar Topic Author
  • Offline
  • New Member
More
10 years 6 months ago - 10 years 6 months ago #53567 by kbonne
I'm getting the following error when running the newest version of the plugin on joomla 3.0.

Warning: Creating default object from empty value in /homepages/33/d274880661/htdocs/globetrans/modules/mod_jw_srfr/helper.php on line 135
this is displayed on the front end of the site before the feed.
Se it here: mirror.fdfodense14.dk/ at the bottom of the site.
I am using Joomla 3.1.5 and PHP version 5.4.18

Isn't there any solution for this problem?

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #53568 by Primavera888
strange. it has never happend to me...

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #53569 by Judah Raine
Hi there, I have the same error. Just started within the last hour.  ???

I would appreciate some urgent assistance, thank you.

Jude

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago #53570 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Warning: Creating default object from empty value
A warning will not affect your site's functionality. Some feeds might not validate or some might be 'broken'.

If your site is in production mode you should probably turn off error reporting.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #53571 by RGRA
Joomla 3.2.0
SRSSFR Version 3.0

Same Probleme here. No matter what feed I enter it always this error. (Error also by validate feeds). Error reporting not activated!
Someone with a clue?

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 4 months ago #53572 by Yiota
Re-install the extension and enter the RSS urls. Then turn off error reporting (in global configuration) and check again.

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #53573 by VaevictisAsmadi
Replied by VaevictisAsmadi on topic Re: Warning: Creating default object from empty value
This warning triggers because they didn't create an object before assigning properties to it, so PHP creates a generic ("default") object and issues the warning (unless error reporting is off).

They do create an object in the same situation just a couple lines of code bellow, so that is inconsistent. To make the offending code also create an object, thus removing the issue, take the file /modules/mod_jw_srfr/helper.php and insert the following line before both lines 135 and 144:
                $feedContents[$key] = new stdClass();
For reference, the original lines 135 and 144 that you are looking for are both equal to:
$feedContents[$key]->feedSubscribeUrl = $feed;

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #55899 by huki
This is so great! Thanks a lot VaevictisAsmadi!

Your solution did work for me however on the version 3.0 the line are 135 and 145 (good thing you added the original line, it was easy to found out the issue!).

Again thanks so much!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum