Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 00b2807 commit 271160c0650669e29162f0c13bf82695b995b946 alexander.makarow committed Feb 23, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 framework/db/ar/CActiveFinder.php
View
7 framework/db/ar/CActiveFinder.php
@@ -200,9 +200,10 @@ private function buildJoinTree($parent,$with,$options=null)
}
// named scope
+ $scopes=empty($options['scopes']) ? array() : (array)$options['scopes'];
if(($pos=strpos($with,':'))!==false)
{
- $options['scopes']=array_merge(explode(':',substr($with,$pos+1)),(array)$options['scopes']);
+ $scopes=array_merge(explode(':',substr($with,$pos+1)),$scopes);
$with=substr($with,0,$pos);
}
@@ -222,8 +223,8 @@ private function buildJoinTree($parent,$with,$options=null)
}
$criteria=new CDbCriteria;
- if(!empty($options['scopes']))
- $criteria->scopes=$options['scopes'];
+ if($scopes!==array())
+ $criteria->scopes=$scopes;
$model->applyScopes($criteria);
$relation->mergeWith($criteria,true);

0 comments on commit 271160c

Please sign in to comment.