summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/NodeForm.php
diff options
context:
space:
mode:
authorAlex Pott2015-02-28 17:11:34 (GMT)
committerAlex Pott2015-02-28 17:11:34 (GMT)
commit0b5f5ce81494a603b86961389f90e58e4bbb12cc (patch)
treeae3b061ed6309275bcfc43a6e7358bcbc6de9cee /core/modules/node/src/NodeForm.php
parent4f33bd494859cdcd24231527e3ef0f97fef7d699 (diff)
Issue #1768526 by swentel, Berdir: NodeFormController::validate() calls buildEntity() twice
Diffstat (limited to 'core/modules/node/src/NodeForm.php')
-rw-r--r--core/modules/node/src/NodeForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index 17066ab..92e7c0c 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -292,13 +292,13 @@ class NodeForm extends ContentEntityForm {
* {@inheritdoc}
*/
public function validate(array $form, FormStateInterface $form_state) {
- $node = $this->buildEntity($form, $form_state);
+ $node = parent::validate($form, $form_state);
if ($node->id() && (node_last_changed($node->id(), $this->getFormLangcode($form_state)) > $node->getChangedTime())) {
$form_state->setErrorByName('changed', $this->t('The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved.'));
}
- parent::validate($form, $form_state);
+ return $node;
}
/**