diff --git a/virustotal.class.php b/virustotal.class.php index e88877d..3e3e856 100644 --- a/virustotal.class.php +++ b/virustotal.class.php @@ -39,7 +39,7 @@ class virustotal { * * response_code (int), verbose_msg (str) * * also hashes/identifiers: sha256, sha1, md5, scan_id, resource */ - protected $json_response = []; + public $json_response = []; /** ScanID we can use to query the state for this file * @class virustotal @@ -95,7 +95,7 @@ function rescan($hash,$maxage=7) { curl_close ($ch); $reply = json_decode($api_reply); - if ( property_exists($reply,'response_code') ) { + if ( is_object($reply) && property_exists($reply,'response_code') ) { $api_rc = $reply->response_code; } else { $api_rc = -99;