Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
30987a36
Commit
30987a36
authored
Aug 31, 2012
by
Committed by
Dave Lawrence
Aug 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 783222 - Make set_all() throw error on invalid param names
r/a=LpSolit
parent
72661fd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Object.pm
Bugzilla/Object.pm
+5
-0
No files found.
Bugzilla/Object.pm
View file @
30987a36
...
...
@@ -321,12 +321,17 @@ sub set_all {
my
%
field_values
=
%
$params
;
my
@sorted_names
=
$self
->
_sort_by_dep
(
keys
%
field_values
);
foreach
my
$key
(
@sorted_names
)
{
# It's possible for one set_ method to delete a key from $params
# for another set method, so if that's happened, we don't call the
# other set method.
next
if
!
exists
$field_values
{
$key
};
my
$method
=
"set_$key"
;
if
(
!
$self
->
can
(
$method
))
{
my
$class
=
ref
(
$self
)
||
$self
;
ThrowCodeError
(
"unknown_method"
,
{
method
=>
"${class}::${method}"
});
}
$self
->
$method
(
$field_values
{
$key
},
\%
field_values
);
}
Bugzilla::Hook::
process
(
'object_end_of_set_all'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment