mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
PropertyModifierArrayToRow: fix on_empty
This commit is contained in:
parent
b961f16dfd
commit
2de46b819c
@ -42,13 +42,12 @@ class PropertyModifierArrayToRow extends PropertyModifierHook
|
||||
public function transform($value)
|
||||
{
|
||||
if (empty($value)) {
|
||||
$onDuplicate = $this->getSetting('on_duplicate', 'reject');
|
||||
$onDuplicate = $this->getSetting('on_empty', 'reject');
|
||||
switch ($onDuplicate) {
|
||||
case 'reject':
|
||||
$this->rejectRow();
|
||||
return null;
|
||||
return [];
|
||||
case 'keep':
|
||||
return null;
|
||||
return [null];
|
||||
case 'fail':
|
||||
throw new InvalidArgumentException('Failed to clone row, value is empty');
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user