From 0dfc6d5eabf34f2e256d9d4c15b6f3dec21fe3fd Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 12 Apr 2013 15:13:58 +1200 Subject: [PATCH] BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields --- forms/PhoneNumberField.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/forms/PhoneNumberField.php b/forms/PhoneNumberField.php index c698e8047..a3a0ac30b 100644 --- a/forms/PhoneNumberField.php +++ b/forms/PhoneNumberField.php @@ -31,7 +31,6 @@ class PhoneNumberField extends FormField { $fields = new FieldGroup( $this->name ); $fields->setID("{$this->name}_Holder"); list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue(); - $hasTitle = false; if ($this->value=="") { $countryCode=$this->countryCode; @@ -51,7 +50,7 @@ class PhoneNumberField extends FormField { } if($this->ext !== null) { - $field->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6)); + $fields->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6)); } $description = $this->getDescription(); @@ -62,7 +61,7 @@ class PhoneNumberField extends FormField { $field->setReadonly($this->isReadonly()); } - return $field; + return $fields; } public function setValue( $value ) {