Changeset 746 for trunk/lib/Utilities.inc.php
- Timestamp:
- May 31, 2021 1:51:18 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r744 r746 1627 1627 $app =& App::getInstance(); 1628 1628 1629 if (false === $resolved_filename = stream_resolve_include_path($filename)) {1629 if (false === ($resolved_filename = stream_resolve_include_path($filename))) { 1630 1630 $app->logMsg(sprintf('JSON file "%s" not found in path "%s"', $filename, get_include_path()), LOG_ERR, __FILE__, __LINE__); 1631 1631 return null; … … 1637 1637 } 1638 1638 1639 if (null === $data = json_decode(file_get_contents($resolved_filename), $assoc, $depth, $options)) {1639 if (null === ($data = json_decode(file_get_contents($resolved_filename), $assoc, $depth, $options))) { 1640 1640 $app->logMsg(sprintf('JSON is unparsable: %s', $resolved_filename), LOG_ERR, __FILE__, __LINE__); 1641 1641 return null; … … 1705 1705 return false; 1706 1706 case -5: 1707 $app->logMsg('IP Intelligence: Banned: no permissionor invalid email address', LOG_WARNING, __FILE__, __LINE__);1707 $app->logMsg('IP Intelligence: Banned: exceeded query limits, no permission, or invalid email address', LOG_WARNING, __FILE__, __LINE__); 1708 1708 return false; 1709 1709 case -6: … … 1711 1711 return false; 1712 1712 default: 1713 if (!is_numeric($response) || $response < 0 || $response >= $threshold) { 1713 if (!is_numeric($response) || $response < 0) { 1714 $app->logMsg(sprintf('IP Intelligence: Unknown status for IP (%s): %s', $response, $ip), LOG_NOTICE, __FILE__, __LINE__); 1715 return false; 1716 } 1717 if ($response >= $threshold) { 1714 1718 $app->logMsg(sprintf('IP Intelligence: Bad IP (%s): %s', $response, $ip), LOG_NOTICE, __FILE__, __LINE__); 1715 1719 return true;
Note: See TracChangeset
for help on using the changeset viewer.