cvs: pearweb /include pear-database-user.php

From: Date: Mon, 16 Mar 2009 21:10:49 +0000
Subject: cvs: pearweb /include pear-database-user.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8271@lists.php.net to get a copy of this message
cweiske Mon Mar 16 21:10:49 2009 UTC Modified files: /pearweb/include pear-database-user.php Log: Don't crash when crashing (e.g. when credentials are wrong) http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database-user.php?r1=1.27&r2=1.28&diff_format=u Index: pearweb/include/pear-database-user.php diff -u pearweb/include/pear-database-user.php:1.27 pearweb/include/pear-database-user.php:1.28 --- pearweb/include/pear-database-user.php:1.27 Fri Jan 23 11:47:18 2009 +++ pearweb/include/pear-database-user.php Mon Mar 16 21:10:49 2009 @@ -146,6 +146,10 @@ static function info($user, $field = null, $registered = true, $hidePassword = true) { global $dbh; + + if (!$dbh) { + return null; + } $handle = strpos($user, '@') ? 'email' : 'handle';

« previous php.pear.core (#8271) next »