diff --git a/NEWS b/NEWS index 8faca29..b8fc69d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ * Version 2.21 unreleased + * Fixed a problem that caused ykval-queue to terminate if the database + was not available initially. + * Version 2.20 released 2013-01-31 * Add ChangeLog generation using git2cl. diff --git a/ykval-db-pdo.php b/ykval-db-pdo.php index 3032490..15d300a 100644 --- a/ykval-db-pdo.php +++ b/ykval-db-pdo.php @@ -28,6 +28,7 @@ class DbImpl extends Db $this->db_username=$db_username; $this->db_password=$db_password; $this->db_options=$db_options; + $this->result = null; $this->myLog=new Log($name); } @@ -96,7 +97,7 @@ class DbImpl extends Db */ public function closeCursor($result=null){ if(!$result) $result = $this->result; - $result->closeCursor(); + if($result) $result->closeCursor(); } public function truncateTable($name)