J4.x

Actionlogs issue with php7.2/en

From Joomla! Documentation

Other languages:

Due to a trailing comma in administrator/components/com_actionlogs/src/Dispatcher/Dispatcher.php Line 39 sites with PHP 7.2 are experiencing an error in actionlogs "syntax error, unexpected ')'".

This does not effect the upgrade functionality when using actionlog.

Errors reported

The error has been reported in the forum https://forum.joomla.org/viewtopic.php?f=9&t=999478

Versions affected

General Information

This pertains only to Joomla! version(s): 4.2.7 running on PHP 7.2

What is the cause

The cause is that PHP 7.2 does not allow trailing commas in its function calls.

How to fix

Trailing-comma.png

The workaround is to update the file administrator/components/com_actionlogs/src/Dispatcher/Dispatcher.php Line 39 and remove the comma as shown in the screenshot. Alternatively if you can upgrade your sites PHP version to a version higher than 7.2 then this would also fix the issue without needing to change the code. It is adviced to use a version of PHP greater than 7 i.e. 8.0 or 8.1 as 7 version of PHP is unsupported by PHP.