Page 1 of 1

PHP 5.2.5 and undefined indexes

Posted: Wed Jan 02, 2008 9:09 pm
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

Re: PHP 5.2.5 and undefined indexes

Posted: Thu Jan 03, 2008 1:33 pm
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