Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

setting recursive to -1

  • Loading branch information...
commit c02912261bc23b956b195edacc362ff0b1b23c5d 1 parent 74a84c9
@dogmatic69 dogmatic69 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/Cake/Model/Behavior/TreeBehavior.php
View
3  lib/Cake/Model/Behavior/TreeBehavior.php
@@ -119,7 +119,8 @@ public function beforeDelete($Model, $cascade = true) {
extract($this->settings[$Model->alias]);
$data = current($Model->find('first', array(
'conditions' => array($Model->alias . '.' . $Model->primaryKey => $Model->id),
- 'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right))));
+ 'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right),
+ 'recursive' => -1)));
if (!$data[$right] || !$data[$left]) {
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.