Skip to content

Commit 3797e78

Browse files
Merge pull request #10 from MorganDawe/morgan_26
FIX: Undefined index error
2 parents bff058c + 972a4bb commit 3797e78

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Plugin/Condition/NodeCompoundCurrentHasTerm.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ public static function create(ContainerInterface $container, array $configuratio
8484
*/
8585
public function defaultConfiguration() {
8686
return array_merge(
87-
['logic' => 'and'],
87+
[
88+
'logic' => 'and',
89+
'uri' => NULL,
90+
'param' => '',
91+
],
8892
parent::defaultConfiguration()
8993
);
9094
}
@@ -137,7 +141,6 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
137141
*/
138142
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
139143
// Set URI for term if possible.
140-
$this->configuration['uri'] = NULL;
141144
$value = $form_state->getValue('term');
142145
$uris = [];
143146
if (!empty($value)) {
@@ -164,12 +167,12 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
164167
* {@inheritdoc}
165168
*/
166169
public function evaluate() {
170+
167171
if (empty($this->configuration['uri']) && !$this->isNegated()) {
168172
return TRUE;
169173
}
170174

171175
$node = $this->retrieveActiveMember();
172-
173176
if (!$node) {
174177
return FALSE;
175178
}

0 commit comments

Comments
 (0)