Commit b4cd8ebc authored by catch's avatar catch
Browse files

fix: #3552531 Unsupported operand types: array + null when calling...

fix: #3552531 Unsupported operand types: array + null when calling field_formatter_third_party_settings_form hook

By: cbstuart
By: tobiasb
(cherry picked from commit 22fac0f4)
parent 0bf6a1c0
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ function (callable $hook, string $module) use (&$settings_form, &$plugin, &$fiel
          $this->entity->getMode(),
          $form,
          $form_state,
        )) ?? [];
        ) ?? []);
      }
    );
    return $settings_form;
+16 −0
Original line number Diff line number Diff line
@@ -98,4 +98,20 @@ public function regionCallback($row): string {
    return 'content';
  }

  /**
   * Implements hook_field_formatter_third_party_settings_form().
   *
   * We add an empty hook implementation to test it does not result in a fatal
   * error in \Drupal\field_ui\Form\EntityViewDisplayEditForm::thirdPartySettingsForm.
   *
   * @see \Drupal\field_ui\Form\EntityViewDisplayEditForm::thirdPartySettingsForm
   * @see \Drupal\Tests\field_ui\Functional\FieldUIIndentationTest::testIndentation
   *
   * @link https://www.drupal.org/project/drupal/issues/3552531
   */
  #[Hook('field_formatter_third_party_settings_form')]
  public function fieldFormatterThirdPartySettingsForm(): void {
    // Empty hook implementation.
  }

}