Your software
My Mautic version is: 3.1.2
My PHP version is: 7.3.11
My Database type and version is: MySQL v 15.1
Your problem
My problem is:
When I ran a cron job in Webmin to check if they work, I got the following error:
PHP Fatal error: Can’t use function return value in write context in /home/XXXXXXX/public_html/bin/console on line 5
The line 5 is as follows:
#!/usr/bin/env php
<?php
// Fix for hosts that do not have date.timezone set
**if (empty(ini_get('date.timezone'))) {**
date_default_timezone_set('UTC');
}
These errors are showing in the log:
There is no error in the logs
Steps I have tried to fix the problem:
I have re-installed 3.1.2
I then removed 3.1.2 and installed 3.1.0 with the same result
I tried to comment the lines out (5 - 7), but then got the following error message
PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/XXXXXXXXXX/public_html/vendor/hoa/protocol/Wrapper.php on line 582