Closed Bug 287083 Opened 19 years ago Closed 19 years ago

getColorPref should not return success if the suplied value is not valid

Categories

(Camino Graveyard :: Preferences, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: torben, Assigned: torben)

Details

Attachments

(1 file)

The function getColorPref in PreferenceManager.mm and PreferencePaneBase.mm
returns success even if the supplied value is not a valid colorstring. It should
fail both if it can't get the pref and when the pref has an invalid value. See
bug  286516 for an example.
getColorPref now returns false if the value is missing, not a string, or an
invalid value. Tested together with the patch for bug 286516.
Assignee: pinkerton → torben
Status: NEW → ASSIGNED
Attachment #178140 - Flags: review?
I checked in the patch. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Shouldn't returnColor just be set to nil on failure? This is what Apple's
methods do.
Comment on attachment 178140 [details] [diff] [review]
Make getColorPref tell if it gets an invalid value

Clearing the review flag since smfr checked this in last month :-)
Attachment #178140 - Flags: review?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: