svn: /pear/pearweb/trunk/cron/ apidoc-queue.php
[email protected] ("Daniel O'Connor") Sat, 30 Jul 2011 16:13:03 +0000
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
--d2cfd14299a06cfa3f3664d9ffd70bb40d0bdf30
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
clockwerx Sat, 30 Jul 2011 16:13:03 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=313972
Log:
Better error handling when DB connections fail
Changed paths:
U pear/pearweb/trunk/cron/apidoc-queue.php
Modified: pear/pearweb/trunk/cron/apidoc-queue.php
===================================================================
--- pear/pearweb/trunk/cron/apidoc-queue.php 2011-07-30 16:10:24 UTC (rev 313971)
+++ pear/pearweb/trunk/cron/apidoc-queue.php 2011-07-30 16:13:03 UTC (rev 313972)
@@ -101,8 +101,10 @@
'persistent' => false,
'portability' => DB_PORTABILITY_ALL,
);
-$dbh =& DB::connect(PEAR_DATABASE_DSN, $options);
-
+$dbh = DB::connect(PEAR_DATABASE_DSN, $options);
+if (PEAR::isError($dbh)) {
+ die($dbh->getMessage());
+}
$query = "SELECT filename FROM apidoc_queue WHERE finished = '0000-00-00 00:00:00'";
$rows = $dbh->getCol($query);
--d2cfd14299a06cfa3f3664d9ffd70bb40d0bdf30--