Discussion:
svn: /pear/pearweb/trunk/cron/ apidoc-queue.php
Daniel O'Connor
2011-07-30 16:10:24 UTC
Permalink
clockwerx Sat, 30 Jul 2011 16:10:24 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313971

Log:
PHP Deprecated: Assigning the return value of new by reference is deprecated

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:02:30 UTC (rev 313970)
+++ pear/pearweb/trunk/cron/apidoc-queue.php 2011-07-30 16:10:24 UTC (rev 313971)
@@ -43,7 +43,7 @@
function infoFromTgzFile($file)
{
$config = &PEAR_Config::singleton();
- $packagefile = &new PEAR_PackageFile($config);
+ $packagefile = new PEAR_PackageFile($config);
$pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pf)) {
$errs = $pf->getUserinfo();
Daniel O'Connor
2011-07-30 16:13:03 UTC
Permalink
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);

Loading...