original_string: public function selectErrors($limit = null)
      {
          if (!$this->isDb()) {
              return array();
          }
  
          $sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC";
  
          if (isset($limit)) {
              settype($limit, 'integer');
              $sql .= " LIMIT 0,$limit";
          }
  
          try {
              $results = $this->db->fetchAll($sql, array('php_%'), array('unserialize' => 'data'));
          } catch (Exception $ex) {
              return array();
          }
  
          $list = array();
  
          foreach ($results as $result) {
              $list[] = $result['data'];
          }
  
          return $list;
      }
code: public function selectErrors($limit = null)
      {
          if (!$this->isDb()) {
              return array();
          }
  
          $sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC";
  
          if (isset($limit)) {
              settype($limit, 'integer');
              $sql .= " LIMIT 0,$limit";
          }
  
          try {
              $results = $this->db->fetchAll($sql, array('php_%'), array('unserialize' => 'data'));
          } catch (Exception $ex) {
              return array();
          }
  
          $list = array();
  
          foreach ($results as $result) {
              $list[] = $result['data'];
          }
  
          return $list;
      }
code_tokens: public function selectErrors ( $ limit = null ) { if ( ! $ this -> isDb ( ) ) { return array ( ) ; } $ sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC" ; if ( isset ( $ limit ) ) { settype ( $ limit , 'integer' ) ; $ sql .= " LIMIT 0,$limit" ; } try { $ results = $ this -> db -> fetchAll ( $ sql , array ( 'php_%' ) , array ( 'unserialize' => 'data' ) ) ; } catch ( Exception $ ex ) { return array ( ) ; } $ list = array ( ) ; foreach ( $ results as $ result ) { $ list [ ] = $ result [ 'data' ] ; } return $ list ; }
docstring: Returns an array of logged PHP errors from the database
  @param integer|null $limit
  @return array
docstring_tokens: Returns an array of logged PHP errors from the database