From: Michael Wallner Date: Sat, 9 Mar 2013 22:17:58 +0000 (+0100) Subject: fix X-Git-Tag: v1.0.0~11 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=commitdiff_plain;h=eb9591d498ac4a2a448d6021c804b3c41d1c7247 fix --- diff --git a/lib/pq/Gateway/Row.php b/lib/pq/Gateway/Row.php index 0a2820a..e408430 100644 --- a/lib/pq/Gateway/Row.php +++ b/lib/pq/Gateway/Row.php @@ -130,7 +130,7 @@ class Row implements \JsonSerializable */ function __get($p) { if (!isset($this->cell[$p])) { - $this->cell[$p] = new Cell($this, $p, $this->data[$p]); + $this->cell[$p] = new Cell($this, $p, isset($this->data[$p]) ? $this->data[$p] : null); } return $this->cell[$p]; } diff --git a/lib/pq/Gateway/Rowset.php b/lib/pq/Gateway/Rowset.php index 7c0a3c2..c0a3370 100644 --- a/lib/pq/Gateway/Rowset.php +++ b/lib/pq/Gateway/Rowset.php @@ -206,7 +206,7 @@ class Rowset implements \SeekableIterator, \Countable, \JsonSerializable */ function current() { if (!$this->valid()) { - throw new OutOfBoundsException("Invalid row index {$this->index}"); + throw new \OutOfBoundsException("Invalid row index {$this->index}"); } return $this->rows[$this->index]; }