PHP 5.2.5 and undefined indexes

Having trouble installing serendipity?
Post Reply
Shaun.Mitchell
Posts: 3
Joined: Wed Jan 02, 2008 8:55 pm

PHP 5.2.5 and undefined indexes

Post by Shaun.Mitchell »

Hello,

My hosting provider upgraded my account to PHP 5.2.5 and I'm now seeing a ton of undefined indexes. I upgraded Serendipity to 1.2.1 but that didn't reslove it either. Here are some random errors I'm seeing:

Notice: Undefined index: searchresult_noEntries in /templates_c/mt3-independence^%%76^767^767E328F%%content.tpl.php on line 15

Notice: Undefined index: content_message in /templates_c/mt3-independence^%%76^767^767E328F%%content.tpl.php on line 26

Notice: Undefined index: prevent_sidebar_plugins_left in /include/plugin_api.inc.php on line 400

Any ideas what might be causing these notices?

EDIT: I was able to remove some noices by re-saving my configuration in the Administration section.

Thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP 5.2.5 and undefined indexes

Post by garvinhicking »

Hi!

Seems your provider raised the PHP errorlevel to also show PHP Notices. Serendipity and Smarty both make use of unitialized variable usage (in a safe context), so you really should not raise the errorlevel to E_NOTICE. Many other PHP applications will then also show notices like that.

So you should talk to your provider to decrease the errorlevel to what it was before.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply