Skip to content

Commit

Permalink
v0.9.1
Browse files Browse the repository at this point in the history
Fixed: Fatal error when lastReportedAt is null
  • Loading branch information
kristuff authored May 28, 2020
2 parents cb333a8 + 0bcf25e commit a563dc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bin/abuseipdb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.9.0
* @version 0.9.1
* @copyright 2020 Kristuff
*/
namespace Kristuff\AbuseIPDB;
Expand Down Expand Up @@ -467,8 +467,12 @@ class AbuseIPDBcli
$line .= self::printResult(' from ', $check->data->numDistinctUsers, $defaultColor, '', false);
$line .= Console::text($nbReport > 0 ? ' distinct users': ' user', 'white');
Console::log($line);

}

if (! empty($check->data->lastReportedAt)){
self::printResult(Console::pad(' Last reported at:', 23), self::getDate($check->data->lastReportedAt), $defaultColor);
}
self::printResult(Console::pad(' Last reported at:', 23), self::getDate($check->data->lastReportedAt), $defaultColor);

// print last reports
$nbLastReports = isset($check->data->reports) ? count($check->data->reports) : 0;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">=7.1",
"kristuff/mishell": "^1.3-stable",
"kristuff/mishell": "^1.4-stable",
"kristuff/abuseipdb": ">=0.1-stable"
},
"autoload": {
Expand Down

0 comments on commit a563dc6

Please sign in to comment.