Skip to content

Instantly share code, notes, and snippets.

@jhalickman
Created April 5, 2012 15:44
Show Gist options
  • Save jhalickman/2312042 to your computer and use it in GitHub Desktop.
Save jhalickman/2312042 to your computer and use it in GitHub Desktop.
hplib/REST/ORMFormatter/Filter.php
@@ -99,8 +99,7 @@ protected function convertCurrencyFields($record,$filtered_record, $fields, $fro
try {
$target_currency = $currency_lookup->getCurrency($to_currency_code);
} catch (Exception_CurrencyNotFound $e) {
- throw new REST_Exception_BadRequest($to_currency_code." is not a valid currency");
- return;
+ return $filtered_record;
}
// get the original currency off $from_code
diff --git a/phplib/REST/Request.php b/phplib/REST/Request.php
index d466276..aadec15 100644
--- a/phplib/REST/Request.php
+++ b/phplib/REST/Request.php
@@ -502,6 +502,9 @@ public function getParam($name, $required=false) {
} else if ($name ==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment