? ? Pending

User tests: Successful: Unsuccessful:

avatar Quy
Quy
17 Jan 2020

Summary of Changes

Fix Invalid argument supplied for foreach() in \libraries\src\Form\FormField.php on line 1134 by checking that it is an array.

Testing Instructions

  • Create a text field.
  • Create a subfield field.
  • Edit an article (leave subfield field empty).
  • Save the article.
  • Check PHP error log.
  • Apply PR.
  • Check PHP error log for no errors.
avatar Quy Quy - open - 17 Jan 2020
avatar Quy Quy - change - 17 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2020
Category Libraries
avatar SharkyKZ
SharkyKZ - comment - 17 Jan 2020

Looks like $value is normally an object, not an array.

avatar Fedik
Fedik - comment - 18 Jan 2020

It may be both, object or array
maybe try !is_scalar($value)
for subform it may enough to check the value exists:
if ($this->multiple && $value)

avatar Quy Quy - change - 18 Jan 2020
Labels Added: ?
avatar Fedik Fedik - test_item - 20 Jan 2020 - Tested successfully
avatar Fedik
Fedik - comment - 20 Jan 2020

I have tested this item successfully on 2603787


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

avatar jwaisner jwaisner - test_item - 21 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 21 Jan 2020

I have tested this item successfully on 2603787


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

avatar Quy Quy - change - 21 Jan 2020
The description was changed
Status Pending Ready to Commit
avatar Quy Quy - edited - 21 Jan 2020
avatar Quy
Quy - comment - 21 Jan 2020

RTC


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

avatar wilsonge wilsonge - change - 21 Jan 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-01-21 11:49:01
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 21 Jan 2020
avatar wilsonge wilsonge - merge - 21 Jan 2020
avatar wilsonge
wilsonge - comment - 21 Jan 2020

Thanks!

Add a Comment

Login with GitHub to post a comment