From c64d7dccf4a17f4629c6983adf05962a26f431e8 Mon Sep 17 00:00:00 2001 From: GrumpyW1zard <39481384+GrumpyW1zard@users.noreply.github.com> Date: Mon, 21 May 2018 10:27:29 +0200 Subject: [PATCH] Changes behaviour from isOneFilled to isAllFilled In original code, it was enough to have filled only one required input in container to function isAllFilled return true. Proposed change updates code in way, that all required inputs must be filled. --- src/Kdyby/Replicator/Container.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Kdyby/Replicator/Container.php b/src/Kdyby/Replicator/Container.php index 93ab02e..9514b7e 100644 --- a/src/Kdyby/Replicator/Container.php +++ b/src/Kdyby/Replicator/Container.php @@ -433,7 +433,10 @@ public function countFilledWithout(array $components = [], array $subComponents } return strlen($value); }; - $rows[] = array_filter(array_diff_key($item, $subComponents), $filter) ?: FALSE; + if (count($item) !== count($row = array_filter(array_diff_key($item, $subComponents), $filter))) { + $row = FALSE; + } + $rows[] = $row; } return count(array_filter($rows));