Merge pull request #1132 from poolpm/patch-1

[FIX] Wrong behavior on Edit Account with no addy
This commit is contained in:
Sebastian Grewe 2013-12-28 12:18:05 -08:00
commit bac119dcc8

View File

@ -281,7 +281,8 @@ class User extends Base {
$this->setErrorMessage('Invalid email address'); $this->setErrorMessage('Invalid email address');
return false; return false;
} }
if ($this->bitcoin->can_connect() === true && !empty($address)) { if (!empty($address)) {
if ($this->bitcoin->can_connect() === true) {
try { try {
$aStatus = $this->bitcoin->validateaddress($address); $aStatus = $this->bitcoin->validateaddress($address);
if (!$aStatus['isvalid']) { if (!$aStatus['isvalid']) {
@ -296,6 +297,7 @@ class User extends Base {
$this->setErrorMessage('Unable to connect to RPC server for coin address validation'); $this->setErrorMessage('Unable to connect to RPC server for coin address validation');
return false; return false;
} }
}
// Number sanitizer, just in case we fall through above // Number sanitizer, just in case we fall through above
$threshold = min($this->config['ap_threshold']['max'], max(0, floatval($threshold))); $threshold = min($this->config['ap_threshold']['max'], max(0, floatval($threshold)));