I just upgraded to newest stable build of v1.17.2 and I no longer was getting any of the tickets from the fetching method. Looked furthur into it and found massive emails with the cron throwing errors:

PHP Parse error: syntax error, unexpected '=' in /var/www/hd/public_html/include/class.forms.php on line 4039

Line 4039: $config['size'] ??= $cfg->getMaxFileSize();

I went ahead and changed it to an isset statement and fixed all issues, (Yes old school way of doing it but works)

if (!isset($config['size'])) { $config['size'] = $cfg->getMaxFileSize(); }

    CDGregory

    That means your cron is running a different version of PHP than your webserver. You need to adjust your cron to run PHP 8.0-8.1 and retest.

    Cheers.

    A. Not sure how this has to deal with Cron as the coding was/is the issue in file include/class.forms.php
    B. What do you mean my "cron" is running a different version of PHP. Or do you mean my "cron job" as you can sepcify a cron job to run a php file using specific versions of php. In any case my server is running 8.0.25 and there are no cron jobs currently.

    But, as I stated I modded the code to use an isset statement and it worked. That ??= is a bogus operator or undocumented at the very least.

      CDGregory

      Not sure how this has to deal with Cron as the coding was/is the issue in file include/class.forms.php

      Just going off of what you said. You said "found massive emails with the cron throwing errors" which means the error is being thrown when fetching emails via cron.

      What do you mean my "cron" is running a different version of PHP. Or do you mean my "cron job" as you can sepcify a cron job to run a php file using specific versions of php. In any case my server is running 8.0.25 and there are no cron jobs currently.

      Cron/cronjob interchangeable really. Don't get hung up on specifics here.

      In any case my server is running 8.0.25 and there are no cron jobs currently.

      Then how are you getting this error on cron when you said: "found massive emails with the cron throwing errors"?

      That ??= is a bogus operator or undocumented at the very least.

      Definitely not bogus and it is documented. It was introduced with PHP 7.4 and is called "Null Coalesce Equal Operator":

      If that isn't found then you are running a PHP version older than 7.4.

      Cheers.

      Sorry, I am litteral so Cron and Cron Jobs are 2 different things to me.
      I do stand corrected on the operator, I know of ?? never saw this page, or just over looked it many times, about the ??=. I will look more into the code to find out why it didnt like it.

      I just reread my initial post. I need more coffee I guess. No clue why I said Cron. Meant to say PHP

      As for when I am referring to the flood of emails I am using the built in EMail Addresses in the admin panel to auto check for emails and create tickets based on which account it comes from. It was not able to create the tickets due to the coding issue on that class.forms.php file in return would send a bounce back to my admin email account with the error.

      But yea, changing the code to use older method of isset seemed to have fixed it.

      Just a little update, you actually hit it dead on the nose. I meant to say PHP throwing errors ealier and didnt really register. Indeed it was an issue with the cronjob. I never really thought about how its doing the fetch process and went digging about. Found it added jobs to the crontab and sure as sh*t it was using 7.3 instead of 8.0/8.1. I updated that and put the coding back to how it was and its working. My appologies, will keep this in mind when furture releases of PHP comes out.

      Write a Reply...