Skip to content
Snippets Groups Projects

Issue #2707689: NodeForm::actions() checks for delete access on new entities

2 files
+ 21
5
Compare changes
  • Side-by-side
  • Inline
Files
2
  • 12e26bd4
    Issue #2965929 by jhedstrom, dimitriskr, kkalashnikov, sun, Lendude,... · 12e26bd4
    catch authored
    Issue #2965929 by jhedstrom, dimitriskr, kkalashnikov, sun, Lendude, DanielVeza: DX: Insufficient error message "The form argument is not a valid form."
@@ -193,8 +193,11 @@ public function getFormId($form_arg, FormStateInterface &$form_state) {
$form_arg = $this->classResolver->getInstanceFromDefinition($form_arg);
}
if (!is_object($form_arg) || !($form_arg instanceof FormInterface)) {
throw new \InvalidArgumentException("The form argument $form_arg is not a valid form.");
if (!is_object($form_arg)) {
throw new \InvalidArgumentException(("The form class $form_arg could not be found or loaded."));
}
elseif (!($form_arg instanceof FormInterface)) {
throw new \InvalidArgumentException('The form argument ' . $form_arg::class . ' must be an instance of \Drupal\Core\Form\FormInterface.');
}
// Add the $form_arg as the callback object and determine the form ID.
Loading