Index: trunk/lib/App.inc.php
===================================================================
--- trunk/lib/App.inc.php	(revision 745)
+++ trunk/lib/App.inc.php	(revision 746)
@@ -429,5 +429,5 @@
             // But not if all DB credentials have been defined already by other means.
             if ($this->cli && '' != $this->getParam('db_auth_file') && (!$this->getParam('db_server') || !$this->getParam('db_name') || !$this->getParam('db_user') || !$this->getParam('db_pass'))) {
-                if (false !== $db_auth_file = stream_resolve_include_path($this->getParam('db_auth_file'))) {
+                if (false !== ($db_auth_file = stream_resolve_include_path($this->getParam('db_auth_file')))) {
                     if (is_readable($db_auth_file)) {
                         $db_auth = json_decode(file_get_contents($db_auth_file), true);
@@ -622,5 +622,5 @@
 
         // Set the application version if defined.
-        if (false !== $site_version_file = stream_resolve_include_path($this->getParam('site_version_file'))) {
+        if (false !== ($site_version_file = stream_resolve_include_path($this->getParam('site_version_file')))) {
             if (mb_strpos($site_version_file, '.json') !== false) {
                 $version_json = json_decode(trim(file_get_contents($site_version_file)), true);
Index: trunk/lib/Currency.inc.php
===================================================================
--- trunk/lib/Currency.inc.php	(revision 745)
+++ trunk/lib/Currency.inc.php	(revision 746)
@@ -123,5 +123,5 @@
     public function getValue($amount, $base, $target)
     {
-        if (false !== $rate = $this->getRate($base, $target)) {
+        if (false !== ($rate = $this->getRate($base, $target))) {
             return abs($rate * $amount);
         } else {
@@ -231,9 +231,9 @@
             // Fetch XML from ECB <http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml>
             $api_url = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml';
-            if (false === $sXML = file_get_contents($api_url)) {
+            if (false === ($sXML = file_get_contents($api_url))) {
                 $app->logMsg(sprintf('Failed to load ECB XML data from: %s', $api_url), LOG_WARNING, __FILE__, __LINE__);
                 return false;
             }
-            if (false === $oXML = simplexml_load_string($sXML)) {
+            if (false === ($oXML = simplexml_load_string($sXML))) {
                 $app->logMsg(sprintf('Failed to decode ECB XML data: %s', truncate($sXML, 200, 'end')), LOG_WARNING, __FILE__, __LINE__);
                 return false;
Index: trunk/lib/Utilities.inc.php
===================================================================
--- trunk/lib/Utilities.inc.php	(revision 745)
+++ trunk/lib/Utilities.inc.php	(revision 746)
@@ -1627,5 +1627,5 @@
     $app =& App::getInstance();
 
-    if (false === $resolved_filename = stream_resolve_include_path($filename)) {
+    if (false === ($resolved_filename = stream_resolve_include_path($filename))) {
         $app->logMsg(sprintf('JSON file "%s" not found in path "%s"', $filename, get_include_path()), LOG_ERR, __FILE__, __LINE__);
         return null;
@@ -1637,5 +1637,5 @@
     }
 
-    if (null === $data = json_decode(file_get_contents($resolved_filename), $assoc, $depth, $options)) {
+    if (null === ($data = json_decode(file_get_contents($resolved_filename), $assoc, $depth, $options))) {
         $app->logMsg(sprintf('JSON is unparsable: %s', $resolved_filename), LOG_ERR, __FILE__, __LINE__);
         return null;
@@ -1705,5 +1705,5 @@
         return false;
     case -5:
-        $app->logMsg('IP Intelligence: Banned: no permission or invalid email address', LOG_WARNING, __FILE__, __LINE__);
+        $app->logMsg('IP Intelligence: Banned: exceeded query limits, no permission, or invalid email address', LOG_WARNING, __FILE__, __LINE__);
         return false;
     case -6:
@@ -1711,5 +1711,9 @@
         return false;
     default:
-        if (!is_numeric($response) || $response < 0 || $response >= $threshold) {
+        if (!is_numeric($response) || $response < 0) {
+            $app->logMsg(sprintf('IP Intelligence: Unknown status for IP (%s): %s', $response, $ip), LOG_NOTICE, __FILE__, __LINE__);
+            return false;
+        }
+        if ($response >= $threshold) {
             $app->logMsg(sprintf('IP Intelligence: Bad IP (%s): %s', $response, $ip), LOG_NOTICE, __FILE__, __LINE__);
             return true;
