Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Patch: Fix some error notices in Sapphire core, profiler, & security


Reply


4 Posts   1802 Views

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

24 May 2007 at 3:15pm

One last patch before I go to bed. :)

I'm starting to try and save patches until the end of the day so that I submit larger ones instead of a bunch of smaller ones to hopefully make it a little less annoying for you guys. ;)

This patch fixes some undefined index and variable errors in sapphire:
http://www.elijahlofgren.com/silverstripe/patches/Sapphire-profiler-core-security-undefined-var-fixes-silverstripe.2.0.DailyBuild.2007-05-23.patch

Errors fixed by this patch:

1. On db/build?flush=1 I got this error:
Notice: Undefined variable: indexType in /var/www/silverstripe/sapphire/core/model/MySQLDatabase.php on line 168

2. When I set ?debug=1 I got this error:

Notice: Undefined variable: desc in /var/www/silverstripe/sapphire/profiler/Profiler.php on line 75

Fix was to add the missing param to Profiler::unmark()

3. When I set ?isDev=1 I got these errors:

Notice: Undefined index: PHP_AUTH_USER in /var/www/silverstripe/sapphire/security/BasicAuth.php on line 15

Notice: Undefined variable: authenticated in /var/www/silverstripe/sapphire/security/BasicAuth.php on line 23

Notice: Undefined index: PHP_AUTH_USER in /var/www/silverstripe/sapphire/security/BasicAuth.php on line 15

Notice: Undefined variable: authenticated in /var/www/silverstripe/sapphire/security/BasicAuth.php on line 23

4. This displayed on /home/

Notice: Undefined offset: 1 in /var/www/silverstripe/sapphire/core/control/ContentController.php on line 133

5. Generated during poll from tutorial 3:
Notice: Undefined variable: result in /var/www/silverstripe/sapphire/core/model/DataObjectSet.php on line 427

Hope this helps,

Elijah Lofgren, the guy who likes to fix undefined variable errors. :)

Avatar
Tim

Core Development Team, 201 Posts

24 May 2007 at 5:08pm

Edited: 24/05/2007 5:08pm

Keep up the awesome work :-)

Avatar
Willr

Forum Moderator, 5513 Posts

24 May 2007 at 9:16pm

wow you are a patching machine :D

Avatar
Andy

230 Posts

28 May 2007 at 2:46pm

Applied, thanks!