diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-06-24 02:39:11 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-06-24 02:39:11 +0200 |
commit | 8f33041e6542f12e6897ef6ed7a67c43a118c504 (patch) | |
tree | c5caf60f706dfa1043a69e135b5246bd63455aae /Bugzilla/Util.pm | |
parent | 0a4878ccff5b9c281b018ad6c13fa5ac40986708 (diff) | |
download | bugzilla-8f33041e6542f12e6897ef6ed7a67c43a118c504.tar.gz bugzilla-8f33041e6542f12e6897ef6ed7a67c43a118c504.tar.xz |
Bug 572602: Change the way that Bugzilla::Object determines what fields
are required for create(). It now assumes that any column that is NOT NULL
and has not DEFAULT in the database is required. We also shift the burden
of throwing errors about empty values to the validators. This fixes the bug
that Bugzilla::Bug->create() wasn't populating default values for fields
if they weren't specified in the create() parameters.
r=timello, a=mkanat
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r-- | Bugzilla/Util.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index bfe630a8f..f5ab51d2b 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -592,8 +592,11 @@ sub is_7bit_clean { } sub clean_text { - my ($dtext) = shift; - $dtext =~ s/[\x00-\x1F\x7F]+/ /g; # change control characters into a space + my $dtext = shift; + if ($dtext) { + # change control characters into a space + $dtext =~ s/[\x00-\x1F\x7F]+/ /g; + } return trim($dtext); } |