Problem/Motivation

TypeError: array_key_first(): Argument #1 ($array) must be of type array, string given in array_key_first() (line 244 of modules/contrib/behat_ui/src/Form/BehatUiNew.php).

Steps to reproduce

Go to admin/config/development/behat-ui/new

Proposed resolution

Cast the default value as an array

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Merge request, Patch, or Commit
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ❌ Release behat_ui-4.0.3

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

CommentFileSizeAuthor
#2 behat_ui_array_conversion.patch581 bytesfsayoub

Comments

Vladimir Tanovic created an issue. See original summary.

fsayoub’s picture

StatusFileSize
new581 bytes

@Vladmir The attached patch (array conversion patch) seemed to work for me and haven't had the error since implementing.

rajab natshah’s picture

Title: Critical error on create new test » Fix Critical error on create new test default list of features in the selected behat features folder

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +behat_ui-2.0.3
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
Issue tags: -behat_ui-2.0.3 +behat_ui-4.0.3
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released behat_ui-4.0.3

rajab natshah’s picture

Status: Fixed » Closed (fixed)