Mailing List Archive

Change to drivers_ldap.php for PHP 5.3
Another PHP 5.3 difference that displays on the setup.php page is the change
to the way references are now handled.

The error that is displayed is:

Deprecated: Assigning the return value of new by reference is deprecated in
/usr/share/davical/inc/drivers_ldap.php on line 251

To fix this I commented out line 251 and added the following lines after it:

unset($ldapDrivers);
$ldapDrivers = new ldapDrivers($c->authenticate_hook['config']);

The reason you use the unset line has to do with the possibility that all
child nodes could then become identical.

Thanks,
Andy

Andy Fore
andy.fore at arfore.com

To see a world in a grain of sand, And a heaven in a wild flower, Hold
infinity in the palm of your hand, And eternity in an hour.

-- William Blake, Auguries of Innocence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.davical.org/pipermail/davical-dev/attachments/20101231/a958379f/attachment.htm>
Change to drivers_ldap.php for PHP 5.3 [ In reply to ]
On Fri, 2010-12-31 at 16:05 -0500, Andy Fore wrote:
> Another PHP 5.3 difference that displays on the setup.php page is the
> change to the way references are now handled.
>
>
> The error that is displayed is:
>
>
> Deprecated: Assigning the return value of new by reference is
> deprecated in /usr/share/davical/inc/drivers_ldap.php on line 251
>
>
> To fix this I commented out line 251 and added the following lines
> after it:
>
>
> unset($ldapDrivers);
> $ldapDrivers = new ldapDrivers($c->authenticate_hook['config']);
>
>
> The reason you use the unset line has to do with the possibility that
> all child nodes could then become identical.

Thanks for this.

I always run with php error reporting set to -1, but since I never use
the LDAP code... :-)

I'm not sure I understand the point of the unset() call though, since
it's an uninitialised local variable in that scope already.


Cheers,
Andrew.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
With listening comes wisdom, with speaking repentance.
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.davical.org/pipermail/davical-dev/attachments/20110101/68f10f58/attachment.pgp>