title: php codeigniter - var_dump shows array but return is null
body: <p>so, this is weird, I have this method called treetrunk that runs up a parent child relationship and is supposed to return an array if ids as a "branchPath" - the method seems to be working just fine as a var_dump in my terminating condition shows the proper array.  However if i try to call the method the returned array is "NULL" - I really dont get it..</p>
  
  <p>Model method:</p>
  
  <pre><code>function treeTrunk($id){//1st id in is page id
      if($id == '0'){
          var_dump($this-&gt;branchPath); //this shows perfect array 
          return $this-&gt;branchPath; //this returns null
      }
      else{
          $q = $this-&gt;getWhere(array('id'=&gt;$id),null,null);
          array_push($this-&gt;branchPath, $q[0]['pageParent']);
          $this-&gt;treeTrunk($q[0]['pageParent']);
      }       
  }
  </code></pre>
  
  <p>Calling via controller:</p>
  
  <pre><code>$d = $this-&gt;pages_mdl-&gt;treeTrunk('150');
  var_dump($d); // &lt;- this == NULL
  </code></pre>
  
  <p>var_dump from within method outputs "array(3) { [0]=> string(3) "148" [1]=> string(3) "146" [2]=> string(1) "0" } "</p>