From ea92dbc8d916598334b9f191a58c0db561f200e5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 28 Mar 2007 00:22:21 +0000 Subject: [PATCH] r1524: In BugAPI::set(), we can't use our pretty call_user_func_array() logic, but rather we now have to do a physical call to parent::set() because of stupid PHP4 --- docs/changes.txt | 1 + includes/api_bug.php | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f5cd907..e394b3d 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -3,6 +3,7 @@ - Fixed: If Gettext isn't installed, a function-not-found error would be thrown - Fixed: On PHP4 systems, a "call to member non-object" error would be thrown because the Authentication class does not have a PHP4 constructor - Fixed: In lost password reset emails, the subject would appear as "Array['trackertitle']" because the variable was not enclosed in curly braces +- Fixed: On PHP4 systems, a bug in the BugAPI would prevent any data from being saved because PHP4 doesn't support call_user_func() of parent:: selectors 1.2.0 Beta 2 =============================== diff --git a/includes/api_bug.php b/includes/api_bug.php index 9f26517..ade993b 100644 --- a/includes/api_bug.php +++ b/includes/api_bug.php @@ -85,17 +85,16 @@ class BugAPI extends API * Subclassed set() that will intercept any custom fields and handle * them appropriately, but everyting else will be passed to the parent. */ - function set() + function set($field, $value, $doclean = true, $doverify = true) { - $args = func_get_args(); - // it's a custom field, so add it in - if (preg_match('#^custom#', $args[0]) == 1 AND !isset($this->fields["$args[0]"])) + if (preg_match('#^custom#', $field) == 1 AND !isset($this->fields["$field"])) { - $this->fields["$args[0]"] = array(TYPE_STR, REQ_NO); + $this->fields["$field"] = array(TYPE_STR, REQ_NO); } - call_user_func_array(array($this, 'parent::set'), $args); + // TODO - (r1524) one day we can change this back to call_user_func_array(array($this, 'parent::set'), func_get_args()) + parent::set($field, $value, $doclean, $doverify); } // ################################################################### -- 2.22.5