summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/NodeForm.php
diff options
context:
space:
mode:
authorAlex Pott2018-05-05 21:36:51 (GMT)
committerAlex Pott2018-05-05 21:36:51 (GMT)
commit84d5e36141af206c71247ced5319c001374fbe1e (patch)
tree393c5f15ff961d8beb9cf08b4c491447cd1e5b67 /core/modules/node/src/NodeForm.php
parent21d49303048bbd726fa9c751f068774626e5916c (diff)
Issue #2969549 by marcel66, martin107: Fix "The $published parameter is deprecated since version 8.3.x and will be removed in 9.0.0." deprecation
Diffstat (limited to 'core/modules/node/src/NodeForm.php')
-rw-r--r--core/modules/node/src/NodeForm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index e1201a1..12f276e 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -217,7 +217,7 @@ class NodeForm extends ContentEntityForm {
public function updateStatus($entity_type_id, NodeInterface $node, array $form, FormStateInterface $form_state) {
$element = $form_state->getTriggeringElement();
if (isset($element['#published_status'])) {
- $node->setPublished($element['#published_status']);
+ $element['#published_status'] ? $node->setPublished() : $node->setUnpublished();
}
}