BTB's version of drupalPostForm() does not allow NULL to be passed as the second parameter. To be backwards compatible with WTB it should accept NULL and silently change it to [].

Comments

jmuzz created an issue. See original summary.

jmuzz’s picture

Status: Active » Needs review
StatusFileSize
new984 bytes
new1.8 KB

The last submitted patch, 3: btb-allow_null_edits-2797947-3-tests_only.patch, failed testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Super nice, even with a test!

dawehner’s picture

What about adding a todo to force people to provide an array in D9?

jmuzz’s picture

StatusFileSize
new2.28 KB
new722 bytes

Makes sense.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: btb-allow_null_edits-2797947-7.patch, failed testing.

jmuzz’s picture

Status: Needs work » Needs review
StatusFileSize
new2.25 KB

Reroll.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you @jmuzz!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -907,6 +907,8 @@ protected function submitForm(array $edit, $submit, $form_html_id = NULL) {
+   *     https://www.drupal.org/node/2797947

This should be a link to a new Drupal 9 issue to fix this - not this issue.

jmuzz’s picture

Status: Needs work » Needs review
StatusFileSize
new2.25 KB
new743 bytes

Created new Drupal 9 issue.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice catch @alexpott

  • alexpott committed bb08449 on 8.3.x
    Issue #2797947 by jmuzz: Allow NULL as second parameter in BTB->...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed bb08449 and pushed to 8.3.x. Thanks!

dawehner’s picture

Can we backport that to 8.2.x as well, given that easies conversions.

Status: Fixed » Closed (fixed)

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