Skip to content

Commit c891966

Browse files
committed
Fix PHP warnings - don't pass an array where a string is expected
1 parent 1c8f604 commit c891966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,7 @@ public function action_div($fid, $id, $div = true)
24602460
'type' => 'text',
24612461
'name' => '_action_var' . $unit . '[' . $id . ']',
24622462
'id' => 'action_var' . $unit . $id,
2463-
'value' => $action[$unit] ?? '',
2463+
'value' => isset($action[$unit]) && !is_array($action[$unit]) ? $action[$unit] : '',
24642464
'size' => 35,
24652465
'class' => $this->error_class($id, 'action', $unit, 'action_var' . $unit),
24662466
]);
@@ -2599,7 +2599,7 @@ public function action_div($fid, $id, $div = true)
25992599
'type' => 'text',
26002600
'name' => "_action_addheader_value[{$id}]",
26012601
'id' => "action_addheader_value{$id}",
2602-
'value' => $action['value'] ?? '',
2602+
'value' => $action['type'] == 'addheader' ? ($action['value'] ?? '') : '',
26032603
'size' => 35,
26042604
'class' => $this->error_class($id, 'action', 'value', 'action_addheader_value'),
26052605
]);

0 commit comments

Comments
 (0)