From a1286e9e7d9c3f653ede9c9c253508db85346c34 Mon Sep 17 00:00:00 2001 From: ADmad Date: Wed, 4 Mar 2015 21:11:18 +0530 Subject: [PATCH] Prefix fields with model alias --- lib/Cake/Model/Behavior/TreeBehavior.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index bb3d81ba7..af12fe6b6 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -132,8 +132,8 @@ class TreeBehavior extends ModelBehavior { $depths[$node[$Model->alias][$primaryKey]] = $depth; $Model->updateAll( - array($settings['level'] => $depth), - array($primaryKey => $node[$Model->alias][$primaryKey]) + array($Model->escapeField($settings['level']) => $depth), + array($Model->escapeField($primaryKey) => $node[$Model->alias][$primaryKey]) ); } }