diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-07-09 14:33:17 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-07-09 14:33:17 -0400 |
commit | 591a0b17c3eab399d7c33b83ef924ff07cbbe635 (patch) | |
tree | 7c98749290795e550dfef91510374ea017c9b3b9 /lib/class | |
parent | 6bfc056b061995edb1c548fe68bfce5086e2f05d (diff) | |
download | ampache-591a0b17c3eab399d7c33b83ef924ff07cbbe635.tar.gz ampache-591a0b17c3eab399d7c33b83ef924ff07cbbe635.tar.bz2 ampache-591a0b17c3eab399d7c33b83ef924ff07cbbe635.zip |
Don't call errorInfo() if we don't have an object
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/dba.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php index 96b313bc..772ab5ab 100644 --- a/lib/class/dba.class.php +++ b/lib/class/dba.class.php @@ -291,7 +291,9 @@ class Dba { $dbh = self::_connect(); if (!$dbh || $dbh->errorCode()) { - self::$_error = json_encode($dbh->errorInfo()); + if ($dbh) { + self::$_error = json_encode($dbh->errorInfo()); + } return false; } |