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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

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


Go to End


3 Posts   2291 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

Community Member, 201 Posts

24 May 2007 at 5:08pm

Edited: 24/05/2007 5:08pm

Keep up the awesome work :-)

Avatar
Willr

Forum Moderator, 5523 Posts

24 May 2007 at 9:16pm

wow you are a patching machine :D