Forum

This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/

Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
"Warning: Creating default object from empty value" after upgrade to PHP 5.4
2 April, 2013
8:50 pm
jstamberg
Member
Members
Forum Posts: 3
Member Since:
2 April, 2013
sp_UserOfflineSmall Offline

Hello everyone,

I greatly appreciate the Sermon Browser plugin. It works great for our church.

 

I received a note a few months back from my webhost (1and1.com) that they would be forcing everyone to upgrade to PHP 5.4. Today I finally got around to making the switch. Everything on all my websites looks good at first glance, except now the popular sermons widget shows a bunch of errors. The error reads:

 

Warning: Creating default object from empty value in /homepages/41/d197534790/htdocs/naknekchurch/wordpress/wp-content/plugins/sermon-browser/sb-includes/frontend.php on line 205

 


You can see the site live at: http://www.naknekchurch.org

The recent sermons widget appears fine, along with the page dedicated to sermons on the site.

Any thoughts or suggestions?

 

Thanks a bunch!

Jim

3 April, 2013
6:05 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Jim,

I think that the problem you are running into is that with PHP 5.4 they changed the way error reporting worked.  Specifically, with 5.4, E_STRICT became part of E_ALL.  Basically, you used to have E_STRICT turned off, and now it is on.  The popular sermons widget apparently has some code in it that works, but generates an E_STRICT warning.

The right thing, I suppose, is to change the widget code so it doesn't generate the warning, but I don't have a fix for you at this time.  However, the following post shows you three ways that you can turn off E_STRICT in PHP 5.4:

http://stackoverflow.com/quest.....in-php-5-4

It shows three different ways to change it.  You could change php.ini, .htaccess, or the individual PHP script.  If you decide to go with the third option, I would try doing it by adding this line somewhere near the top of /wp-content/plugins/sermon-browser/sermon.php:

error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);

Please let us know if you get it working or if you have any questions at all.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

1 May, 2013
7:15 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Jim, I think I've got a fix for this.  If you'd like to try it out, I'd appreciate it.  The change is in "wp-content/plugins/sermon-browser/sb-includes/frontend.php" in function sb_widget_popular( ).  About 10 lines into the function, you'll find this line:

http://pastebin.com/2DA6pTib

(Visit the link to see the line.)

 

Immediately after that line, add the following new lines:

http://pastebin.com/pkDJWDeV

 

If you have any questions, or you need step-by-step instructions, let me know.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

7 February, 2014
6:56 pm
jstamberg
Member
Members
Forum Posts: 3
Member Since:
2 April, 2013
sp_UserOfflineSmall Offline

Hi Ben,

 

Its been a busy year, and I didn't realize you had responded to my post from May. My apologies. Today I was just starting to try and fix this problem again, and I stumbled upon my post/question accidentally.

 

After updating to the most recent version of Sermon Browser, I went to try your suggestion, and I noticed that you must have already put this new code into the most recent version. Unfortunately, I am still having the same problem. Its not a big deal, I can just disable the popular sermons widget, but do you have any other ideas that might fix the problem?

 

Thanks for your help!!

 

Jim Stamberg

22 September, 2014
7:07 pm
screasy
Member
Members
Forum Posts: 3
Member Since:
22 September, 2014
sp_UserOfflineSmall Offline

Any more updates on this?  I just moved our site from a Windows server, where it worked perfectly, to a Linux server using PHP5.4 where I get the error:

Warning: Creating default object from empty value in/home/gracem10/public_html/wp-content/plugins/sermon-browser/sb-includes/frontend.php on line 208

about 20 times before the Popular Sermons finally appear at the bottom.  Website is http://www.gracemaryville.org

 

I would like to get this fixed, as it is the only glitch I can't seem to easily fix!

 

Thanks!

25 September, 2014
10:44 pm
screasy
Member
Members
Forum Posts: 3
Member Since:
22 September, 2014
sp_UserOfflineSmall Offline

Looks like this is a declaration problem?  I don't know PHP, although I do have a programming background.  Anyone got any ideas?  Anyone?

https://wordpress.org/support/.....nctionsphp

6 October, 2014
4:42 am
screasy
Member
Members
Forum Posts: 3
Member Since:
22 September, 2014
sp_UserOfflineSmall Offline

I have recently discovered that with the Most Popular Sermons widget, if only the Sermon option is selected, there is no error, but if either the Series or Preacher option is selected, the error is generated.  Any ideas?

15 October, 2014
12:17 am
jstamberg
Member
Members
Forum Posts: 3
Member Since:
2 April, 2013
sp_UserOfflineSmall Offline

Hi Screasy,

Sorry for the silence here. I have not figured anything out. My solution is the same as yours.... I simply only show the recent sermons widget now.

I hope you can get it figured out. If you do, please post back.

Jim

Forum Timezone: Europe/London
Most Users Ever Online: 381
Currently Online:
Guest(s) 5
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Rich Brown: 358
Matt Schlueter: 93
Mindy: 72
Don Johnson: 65
anointed: 57
0be1: 55
Member Stats:
Guest Posters: 7
Members: 3188
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1713
Posts: 7499
Newest Members:
marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb
Moderators: Ben Miller: 1628
Administrators: Mark Barnes: 435