movedown method not saving new position - cakephp tree

Posted by Ryan on Stack Overflow See other posts from Stack Overflow or by Ryan
Published on 2011-01-11T17:41:59Z Indexed on 2011/01/11 21:53 UTC
Read the original article Hit count: 144

Filed under:
|
|

Hi everyone, I am experiencing a problem that has popped up recently and is causing quite a bit of trouble for our system.

The app we have relies on using the movedown method to organize content, but as of late it has stopped working and began to generate the following warning:

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]

The line being referenced:

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

The line calling the method:

$this->movedown($id,abs((int)$position));

I have exhausted every idea I could come up with. Has anyone else crossed this issue before?

Any help, or pointing in a direction would be much appreciated!

© Stack Overflow or respective owner

Related posts about php

Related posts about cakephp