?
avatar joomdonation
joomdonation
22 Feb 2019

Steps to reproduce the issue

Use Joomla subform on PHP older than 5.5

Expected result

Works as expected

Actual result

Fatal error: Can't use function return value in write context in /home/content/76/10380776/html/imbarcoimmediato/layouts/joomla/form/field/subform/repeatable-table.php on line 59

System information (as much as possible)

Joomla 3.9.3, PHP 5.4.19 (it's a client website)

Additional comments

The line of code causing the error is here https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/form/field/subform/repeatable-table.php#L59 . According to php manual http://php.net/manual/en/function.empty.php:

Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error

Maybe we can change if (!empty(JText::($field->description))) to if (JText::($field->description) !== '') or add a new variable to store JText::_($field->description) before passing it to empty call

avatar joomdonation joomdonation - open - 22 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2019
Closed_Date 2019-02-22 16:37:20 2019-02-22 16:37:21
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 22 Feb 2019
avatar Quy Quy - change - 22 Feb 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-02-22 16:37:20
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Feb 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23982

avatar Quy
Quy - comment - 22 Feb 2019

Please test PR #23984


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23982.

avatar Quy
Quy - comment - 22 Feb 2019

Please test PR #23984


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23982.

Add a Comment

Login with GitHub to post a comment