From 96c80c1a77e9c83ba6026c6fc216df884c96c300 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Mon, 26 Jul 2021 05:27:33 +1000 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=B1=D0=B5=D1=81=D0=BA=D0=BE=D0=BD=D0=B5?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=D0=B5=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=BE=20FOR=20(foreach)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/yii2/arangodb/Query.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mirzaev/yii2/arangodb/Query.php b/mirzaev/yii2/arangodb/Query.php index be0f689..f92702c 100644 --- a/mirzaev/yii2/arangodb/Query.php +++ b/mirzaev/yii2/arangodb/Query.php @@ -406,19 +406,17 @@ class Query extends Component implements QueryInterface foreach ($conditions as $condition) { // Перебор выражений - genForeach_recursion: - foreach ($condition as $FOR => $IN) { // Инициализация операндов if (is_int($FOR) && is_array($IN)) { // Вложенный массив (неожиданные входные данные) - // Реинициализация - $condition = $IN; + // !!! Вход в рекурсию !!! + // Обработка вложенного массива + $aql .= ' ' . $this->genForeach([$IN]); - // Перебор вложенного массива - goto genForeach_recursion; + continue; } $aql .= "FOR $FOR IN $IN ";