Skip to content

Commit 0dfc6d5

Browse files
committed
BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields
1 parent 59dc008 commit 0dfc6d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

forms/PhoneNumberField.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function Field($properties = array()) {
3131
$fields = new FieldGroup( $this->name );
3232
$fields->setID("{$this->name}_Holder");
3333
list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue();
34-
$hasTitle = false;
3534

3635
if ($this->value=="") {
3736
$countryCode=$this->countryCode;
@@ -51,7 +50,7 @@ public function Field($properties = array()) {
5150
}
5251

5352
if($this->ext !== null) {
54-
$field->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6));
53+
$fields->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6));
5554
}
5655

5756
$description = $this->getDescription();
@@ -62,7 +61,7 @@ public function Field($properties = array()) {
6261
$field->setReadonly($this->isReadonly());
6362
}
6463

65-
return $field;
64+
return $fields;
6665
}
6766

6867
public function setValue( $value ) {

0 commit comments

Comments
 (0)