diff --git a/cronjobs/payouts.php b/cronjobs/payouts.php index b3840fef..579890d3 100755 --- a/cronjobs/payouts.php +++ b/cronjobs/payouts.php @@ -61,13 +61,13 @@ if ($setting->getValue('disable_manual_payouts') != 1) { $log->logError('Failed to verify this users coin address, skipping payout'); continue; } - } catch (BitcoinClientException $e) { + } catch (Exception $e) { $log->logError('Failed to verify this users coin address, skipping payout'); continue; } try { $txid = $bitcoin->sendtoaddress($aData['coin_address'], $dBalance - $config['txfee']); - } catch (BitcoinClientException $e) { + } catch (Exception $e) { $log->logError('Failed to send requested balance to coin address, please check payout process. Does the wallet cover the amount?'); continue; } @@ -123,7 +123,7 @@ if ($setting->getValue('disable_auto_payouts') != 1) { $log->logError('Failed to verify this users coin address, skipping payout'); continue; } - } catch (BitcoinClientException $e) { + } catch (Exception $e) { $log->logError('Failed to verify this users coin address, skipping payout'); continue; } @@ -131,7 +131,7 @@ if ($setting->getValue('disable_auto_payouts') != 1) { // Send balance, fees are reduced later by RPC Server try { $txid = $bitcoin->sendtoaddress($aUserData['coin_address'], $dBalance - $config['txfee']); - } catch (BitcoinClientException $e) { + } catch (Exception $e) { $log->logError('Failed to send requested balance to coin address, please check payout process. Does the wallet cover the amount?'); continue; } diff --git a/public/include/classes/bitcoin.class.php b/public/include/classes/bitcoin.class.php index 129cb61c..d91d5fc2 100644 --- a/public/include/classes/bitcoin.class.php +++ b/public/include/classes/bitcoin.class.php @@ -313,7 +313,7 @@ class BitcoinClient extends jsonRPCClient { public function can_connect() { try { $r = $this->getinfo(); - } catch (BitcoinClientException $e) { + } catch (Exception $e) { return $e->getMessage(); } return true; diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index af42eabd..677acf47 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -332,7 +332,7 @@ class User extends Base { $this->setErrorMessage('Invalid coin address'); return false; } - } catch (BitcoinClientException $e) { + } catch (Exception $e) { $this->setErrorMessage('Unable to verify coin address'); return false; } diff --git a/public/include/jsonRPCClient.php b/public/include/jsonRPCClient.php index 2d386f8a..12b9a0c9 100644 --- a/public/include/jsonRPCClient.php +++ b/public/include/jsonRPCClient.php @@ -129,7 +129,7 @@ class jsonRPCClient { 'content' => $request )); $context = stream_context_create($opts); - if ($fp = fopen($this->url, 'r', false, $context)) { + if ($fp = @fopen($this->url, 'r', false, $context)) { $response = ''; while($row = fgets($fp)) { $response.= trim($row)."\n";