不保存新位置的向下移动方法-cakephp树

不保存新位置的向下移动方法-cakephp树,php,cakephp,tree,Php,Cakephp,Tree,我最近遇到了一个问题,给我们的系统带来了不少麻烦 我们使用的应用程序依赖于使用movedown方法来组织内容,但最近它已停止工作,并开始生成以下警告: Warning (2): array_values() [<a href='function.array-values'>function.array-values</a>]: The argument should be an array in [/usr/local/home/cake/cake_0_2_9/cake/

我最近遇到了一个问题,给我们的系统带来了不少麻烦

我们使用的应用程序依赖于使用movedown方法来组织内容,但最近它已停止工作,并开始生成以下警告:

Warning (2): array_values() [<a href='function.array-values'>function.array-values</a>]: The argument should be an array in [/usr/local/home/cake/cake_0_2_9/cake/libs/model/behaviors/tree.php, line 459]
调用该方法的行:

$this->movedown($id,abs((int)$position));
我已经用尽了我能想出的每一个主意。以前有没有其他人越过这个问题

任何帮助,或指向一个方向将不胜感激

简化你的问题

Configure::write('debug', 1); // <- turn on debug mode (if not set earlier)

$fields = array($Model->primaryKey, $left, $right, $parent), 'recursive' => $recursive));
$conditions = array($scope, $Model->escapeField() => $id);
$results = $Model->find('first', array(
   'conditions' => $conditions,
   'fields' => $fields)
);
$values = array_values($results);
list($node) = $values;

echo '<pre>'; 
debug($fields);
debug($conditions); 
debug($results);
debug($values); 
debug($node); 
exit;
Configure::write('debug',1);//primaryKey、$left、$right、$parent),'recursive'=>$recursive));
$conditions=array($scope,$Model->escapeField()=>$id);
$results=$Model->find('first',数组(
“条件”=>$conditions,
“字段”=>$fields)
);
$values=数组_值($results);
列表($node)=$value;
回声';
调试($字段);
调试条件;
调试(结果);
调试($值);
调试($节点);
出口

现在您可以看到哪个变量被传递为未定义。

变量的数据类型和示例值是什么?在没有赋值或数组值调用的情况下,在Model::find调用上打印\u r时,输出是什么?
Configure::write('debug', 1); // <- turn on debug mode (if not set earlier)

$fields = array($Model->primaryKey, $left, $right, $parent), 'recursive' => $recursive));
$conditions = array($scope, $Model->escapeField() => $id);
$results = $Model->find('first', array(
   'conditions' => $conditions,
   'fields' => $fields)
);
$values = array_values($results);
list($node) = $values;

echo '<pre>'; 
debug($fields);
debug($conditions); 
debug($results);
debug($values); 
debug($node); 
exit;