php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5964 ldap_first_attribute - internal memory location pointer needs & sign else fail
Submitted: 2000-08-04 15:03 UTC Modified: 2000-08-08 20:02 UTC
From: luis_garcia at candle dot com Assigned: sniper (profile)
Status: Closed Package: LDAP related
PHP Version: 4.0.1pl2 OS: Windows NT 4.0 SP5
Private report: No CVE-ID: None
 [2000-08-04 15:03 UTC] luis_garcia at candle dot com
Using downloaded pre-compiled win32 modules. 

In php.ini: allow_call_time_pass_reference = Off

The code below generates a warning. Removing the reference 
from $mem causes nothing to be returned.

// ... initialize memory location pointer
$mem = 0;

// ... get the first attribute
$attr = ldap_first_attribute($link, $entry, &$mem);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-04 16:28 UTC] luis_garcia at candle dot com
I have not looked at the source but I suspect that the problem may be that the ldap_first_attribute function declaration must be modified to require the relevant argument by reference. This probably also applies to the function ldap_next_attribute.
 [2000-08-04 19:17 UTC] sniper@php.net
Possible fix in CVS. Please try it out. 

--Jani

 [2000-08-08 20:02 UTC] sniper@php.net
Fixed in CVS. Nobody complained so this works. At least it does for me.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC