diff --git a/src/lib/Query/Content/CriterionVisitor/IsContainer.php b/src/lib/Query/Content/CriterionVisitor/IsContainer.php index c0fc550d..6aaf082e 100644 --- a/src/lib/Query/Content/CriterionVisitor/IsContainer.php +++ b/src/lib/Query/Content/CriterionVisitor/IsContainer.php @@ -22,7 +22,11 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) $value = $criterion->value; if (!is_array($value) || !is_bool($value[0])) { - throw new \LogicException('Criterion value should be of type array'); + throw new \LogicException(sprintf( + '%s value should be of type array, received %s.', + Criterion\IsContainer::class, + get_debug_type($value), + )); } return 'content_type_is_container_b:' . ($value[0] ? 'true' : 'false'); diff --git a/src/lib/Query/Location/CriterionVisitor/IsContainer.php b/src/lib/Query/Location/CriterionVisitor/IsContainer.php index a5eeafb3..50a45908 100644 --- a/src/lib/Query/Location/CriterionVisitor/IsContainer.php +++ b/src/lib/Query/Location/CriterionVisitor/IsContainer.php @@ -22,7 +22,11 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) $value = $criterion->value; if (!is_array($value) || !is_bool($value[0])) { - throw new \LogicException('Criterion value should be of type array'); + throw new \LogicException(sprintf( + '%s value should be of type array, received %s.', + Criterion\IsContainer::class, + get_debug_type($value), + )); } return 'is_container_b:' . ($value[0] ? 'true' : 'false');