I got the error when running this on the Emergency module: https://www.drupal.org/project/emergency

Invalid argument supplied for foreach() InfoToYAML.php:38

It's pretty obvious when looking at the code where the error occurred. If there are no dependencies, the foreach still attempts to access $info['dependencies'], which has not been set.

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Status: Active » Needs review
StatusFileSize
new1.92 KB

I simply moved the loop inside the if statement

solideogloria’s picture

Updated so that dependencies will be omitted from info.yml if there are none, rather than displaying empty curly braces.

Status: Needs review » Needs work
solideogloria’s picture

Status: Needs work » Needs review

Changed back to Needs Review because branch is failing.

joshi.rohit100’s picture

StatusFileSize
new684 bytes

Uploading the fresh patch.

joseph.olstad’s picture

This patch still applies cleanly
triggering test for php 7.1.x and core 8.7.x.
Ignore the php 5.x fails,

I have not confirmed the reported issue but the patch makes sense.

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.