Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/CountryDropdownField.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function defaultToVisitorCountry($val) {
$this->defaultToVisitorCountry = $val;
}

function Field() {
function Field($properties = array()) {
$source = $this->getSource();

if($this->defaultToVisitorCountry && !$this->value || !isset($source[$this->value])) {
$this->value = ($vc = Geoip::visitor_country()) ? $vc : Geoip::get_default_country_code();
}

return parent::Field();
return parent::Field($array);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong variable

}
}
}