[Jazzaaf] xenAntiVirus

[Jazzaaf] xenAntiVirus 1.0.1

No permission to download
Recently I have been receiving the following error:

Code:
ErrorException: [E_WARNING] Trying to access array offset on value of type null src/addons/Jazzaaf/

Code:
#0 src/addons/Jazzaaf/xenAntiVirus/Cron/AttachmentCheck.php(111): XF::handlePhpError(2, '[E_WARNING] Try...', '/var/www/vhosts...', 111)
#1 src/XF/Job/Cron.php(37): Jazzaaf\xenAntiVirus\Cron\AttachmentCheck::runAttachmentCheck(Object(XF\Entity\CronEntry))
#2 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#5 src/XF/Cli/Command/RunJobs.php(59): XF\Job\Manager->runQueue(false, 8)
#6 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 src/XF/Cli/Runner.php(111): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 cmd.php(15): XF\Cli\Runner->run()
#12 {main}

Code:
array(1) {
  ["cli"] => string(76) "/var/www/vhosts/.../httpdocs/cmd.php xf:run-jobs"
}

Does anyone know of this problem and how to prevent it?
 
I have tried to intercept this error.
Please test and let me know.
Edit src/addons/Jazzaaf/xenAntiVirus/Cron/AttachmentCheck.php
From line 110:

Code:
...
                // your resource is queued for analysis
                if (isset($api_reply_array['response_code'])) {
                    if($api_reply_array['response_code']==-2) {
                        $db->query("UPDATE xf_jz_antivirus_check SET last_message = '" . $api_reply_array['verbose_msg'] . "', last_check_date = " . time() . ", check_status = 'pending' WHERE check_id = " . $v['check_id']);
                    }
          
                    // reply is OK (it contains an antivirus report)
                    // use the variables from $api_reply_array to process the antivirus data
                    if($api_reply_array['response_code']==1) {
                        $positives_count = $api_reply_array['positives'];
                } else {
                    $positives_count = 0;
                }

                if ($positives_count > 0) {
                    $check_status = "infected";
              
                // send alert
...

Attention:
This will only skip the problem. An infected file will not be reported this way!
 
Last edited:
  • ErrorException: [E_WARNING] Trying to access array offset on null
  • src/addons/Jazzaaf/xenAntiVirus/Cron/AttachmentCheck.php:111
  • Generated by: Unknown account
  • Aug 13, 2024 at 6:42 PM

Stack trace​

#0 src/addons/Jazzaaf/xenAntiVirus/Cron/AttachmentCheck.php(111): XF::handlePhpError(2, '[E_WARNING] Try...', '/home/u70902518...', 111)
#1 src/XF/Job/Cron.php(42): Jazzaaf\xenAntiVirus\Cron\AttachmentCheck::runAttachmentCheck(Object(XF\Entity\CronEntry))
#2 src/XF/Job/Manager.php(275): XF\Job\Cron->run(8)
#3 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#4 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#5 job.php(46): XF\Job\Manager->runQueue(false, 8)
#6 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(134) "https://mozodeals.com/threads/pigeo...ead-toaster-for-your-home-750-watt-black.539/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Back
Top Bottom