[Tickets #4964] Passwd fails to get a the instance of Driver

bugs@bugs.horde.org bugs at bugs.horde.org
Thu Feb 1 02:45:02 PST 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=4964
-----------------------------------------------------------------------
 Ticket             | 4964
 Created By         | bertoncello at internet24.de
 Summary            | Passwd fails to get a the instance of Driver
 Queue              | Passwd
 Version            | 3.0
 Type               | Bug
 State              | Unconfirmed
 Priority           | 2. Medium
 Owners             | 
-----------------------------------------------------------------------


bertoncello at internet24.de (2007-02-01 02:45) wrote:

I configured a Backend as sql (Postgres) with this data:

$backends['cf'] = array (
    'name' => 'CF',
    'preferred' => '',
    'password policy' => array(
        'minLength' => 3,
        'maxLength' => 24,
        'maxSpace' => 0,
        'minUpper' => 0,
        'minLower' => 0,
        'minNumeric' => 0,
        'minSymbols' => 0
    ),
    'driver' => 'sql',
    'params' => array(
        'phptype'    => 'pgsql',
        'hostspec'   => 'myserver.de',
        'protocol'   => 'tcp',
        'username'   => 'postgres',
        'password'   => 'mypassword',
        'encryption' => 'plain',
        'database'   => 'config',
        'table'      => 'account',
        'user_col'   => 'accountname',
        'pass_col'   => 'passwd',
        'show_encryption' => false
        // The following two settings allow you to specify custom queries
for
        // lookup and modify functions if special functions need to be
        // performed.  In places where a username or a password needs to
be
        // used, refer to this placeholder reference:
        //    %u -> gets substituted with the user
        //    %p -> gets substituted with the plaintext password
        //    %e -> gets substituted with the encrypted password
        //
        // 'query_lookup' => 'SELECT user_pass FROM horde_users WHERE
user_uid = %u',
        // 'query_modify' => 'UPDATE horde_users SET user_pass = %e WHERE
user_uid = %u',
    )
);

When the user tries to change his password, he gets this error:

Notice: Only variable references should be returned by reference in
/usr/share/horde3/passwd/lib/Driver.php on line 110

I resolved this error by changing the line 110 of Driver.php as follow:

            $ret = &new $class($params);
            return $ret;
//            return $ret = &new $class($params);

Then, it runs without problem...
I hope, this change will appears by the next release... :)




More information about the bugs mailing list