Page MenuHomePhabricator

HTMLForm.php Bug - $this->mName used twice in a row
Closed, ResolvedPublic

Description

Author: e.wolfie

Description:
In the radiobox() function $this->mName and the dash should be removed from the
call to fieldset().

Here's the patch:

Index: includes/HTMLForm.php

  • includes/HTMLForm.php (revision 16313)

+++ includes/HTMLForm.php (working copy)
@@ -71,7 +71,7 @@

( $checked ? ' checked="checked"' : '' ) . " />"

. wfMsg( $this->mName.'-'.$varname.'-'.$value ) .

                "</label></div>\n";
}
  • return $this->fieldset( $this->mName.'-'.$varname, $s );

+ return $this->fieldset( $varname, $s );

}

/**

Version: 1.8.x
Severity: normal

Details

Reference
bz7188

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:27 PM
bzimport set Reference to bz7188.
bzimport added a subscriber: Unknown Object (MLST).

e.wolfie wrote:

Patch for HTMLForm.php

Attached:

e.wolfie wrote:

Look in fieldset() - it's prepending $this->mName twice. Once in this method
(radiobox()) when it calls fieldset() and once in the fieldset() method itself.
You end up with $this->mName . '-' . $this->mName . '-' . $varname, which
doesn't make sense.