From eb9591d498ac4a2a448d6021c804b3c41d1c7247 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sat, 9 Mar 2013 23:17:58 +0100 Subject: [PATCH] fix --- lib/pq/Gateway/Row.php | 2 +- lib/pq/Gateway/Rowset.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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]; } -- 2.30.2