From a956f5a4a9be9ed428073d509492f0f1685d7993 Mon Sep 17 00:00:00 2001 From: Mark Jordan Date: Tue, 2 Jul 2019 09:45:37 -0700 Subject: [PATCH] Work on #1199. (#149) --- src/Plugin/Condition/NodeHadNamespace.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Condition/NodeHadNamespace.php b/src/Plugin/Condition/NodeHadNamespace.php index eb0f43d4..a033913a 100644 --- a/src/Plugin/Condition/NodeHadNamespace.php +++ b/src/Plugin/Condition/NodeHadNamespace.php @@ -145,8 +145,8 @@ class NodeHadNamespace extends ConditionPluginBase implements ContainerFactoryPl * TRUE if entity has the specified namespace, otherwise FALSE. */ protected function evaluateEntity(EntityInterface $entity) { - if ($entity->hasField('field_pid')) { - $pid_field = $this->configuration['pid_field']; + $pid_field = $this->configuration['pid_field']; + if ($entity->hasField($pid_field)) { $pid_value = $entity->get($pid_field)->getValue(); $pid = $pid_value[0]['value']; $namespace = strtok($pid, ':') . ':';