J4 Issue ?
avatar Quy
Quy
18 Nov 2018

Steps to reproduce the issue

Go to Global Configuration.
Click Save button.
View PHP error log file.

Actual result

Invalid argument supplied for foreach() in \libraries\src\Form\Rule\RulesRule.php on line 104

System information (as much as possible)

v4alpha6

avatar Quy Quy - open - 18 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 18 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Nov 2018
avatar infograf768 infograf768 - change - 19 Nov 2018
Labels Added: J4 Issue
avatar infograf768 infograf768 - labeled - 19 Nov 2018
avatar infograf768
infograf768 - comment - 19 Nov 2018

I confirm this.

avatar infograf768
infograf768 - comment - 19 Nov 2018

$elActions is boolean in 4.0 while it is an array in 3.x, thus why we get this Invalid argument

avatar infograf768
infograf768 - comment - 19 Nov 2018

Maybe we need to do

		// Iterate over the asset actions and add to the actions.
		if ($elActions)
		{
			foreach ($elActions as $item)
			{
				$actions[] = $item->name;
			}
		}

@laoneo ?

avatar Quy
Quy - comment - 19 Nov 2018

Since$elActions is a boolean, then there is no purpose in looping through it as if it is an array.

avatar laoneo
laoneo - comment - 20 Nov 2018

You are right, please test #23125.

avatar infograf768 infograf768 - change - 20 Nov 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-11-20 08:53:45
Closed_By infograf768
avatar infograf768
infograf768 - comment - 20 Nov 2018
avatar infograf768 infograf768 - close - 20 Nov 2018

Add a Comment

Login with GitHub to post a comment