cvs: pear /Auth/Container File.php
| From: | Martin Jansen | Date: | Thu, 29 Nov 2001 19:04:17 +0000 |
| Subject: | cvs: pear /Auth/Container File.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1434@lists.php.net to get a copy of this message | ||
mj Thu Nov 29 14:04:17 2001 EDT
Modified files:
/pear/Auth/Container File.php
Log:
* Return an empty array if there are no users in the file.
Index: pear/Auth/Container/File.php
diff -u pear/Auth/Container/File.php:1.3 pear/Auth/Container/File.php:1.4
--- pear/Auth/Container/File.php:1.3 Thu Nov 29 14:01:00 2001
+++ pear/Auth/Container/File.php Thu Nov 29 14:04:17 2001
@@ -17,7 +17,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: File.php,v 1.3 2001/11/29 19:01:00 mj Exp $
+// $Id: File.php,v 1.4 2001/11/29 19:04:17 mj Exp $
//
require_once "File/Passwd.php";
@@ -32,7 +32,7 @@
*
* @author Stefan Ekman <stekman@sedata.net>
* @package Auth
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
class Auth_Container_File extends Auth_Container
{
@@ -90,6 +90,10 @@
function listUsers()
{
$users = $this->pwfile->listUsers();
+
+ if (!is_array($users)) {
+ return array();
+ }
foreach ($users as $key => $value) {
$retVal[] = array("username" => $key, "password" => $value);