title: __toString() must return a string value
body: <p>Can someone tell me what I am doing wrong? This is my first time using __toString. I receiving the follwoing error: <code>Catchable fatal error: Method users_class::__toString() must return a string value</code></p>
  
  <p>This is my call to the object using Smarty:</p>
  
  <pre><code> {assign var='udatas' value="$userObj-&gt;fetchUser(array('id'=&gt;$ststres[ststval].to_id))"}
  </code></pre>
  
  <p>This is the object.</p>
  
  <pre><code>class users_class {
  
  protected $users_class;
  
  public function __toString() {
  
      return $this-&gt;users_class;
  }
    public function fetchUser(array $conditions){
              $db = Core::getInstance();
  
              $sql = "SELECT * FROM ".USERS." WHERE ";
              $i=0;
              $params = array();
              //$where = array();
              foreach ($conditions as $column =&gt; $value) {
              if (preg_match('/^[a-z-.-_]+$/', $column)) {
                  if($i!=0){
                      $sql .= " AND ";
                  }
              $sql .= "$column = ?";
              $params[] = $value;
              $i++;
  
      }
     }            
              //$sql .= implode(' AND ', $where);
              //$sql .= " order by title asc";    
              $res = $db-&gt;dbh-&gt;prepare($sql);
              $res-&gt;execute(array_values($params));
              return $res-&gt;fetch(PDO::FETCH_ASSOC);               
  }   
     }
  </code></pre>