Home » Networking » Net_LDAP » Bug #5191
"shift_entry" alias does not work
Details
| Submitted | 2005-08-23 22:48 UTC |
|---|---|
| From | seansd at yahoo dot com |
| Assigned | delatbabel |
| Status | Closed |
| Package | Net_LDAP |
| PHP Version | 4.3.2 |
| OS | RHE3 |
| Roadmaps | (Not assigned) |
Comments
[2005-08-23 22:48 UTC] seansd at yahoo dot com
Description:
------------
alias "shift_entry" does not work. only retrieves first record of recordset. "shiftentry" does work properly.
[2005-09-19 10:22 UTC] fw at weisshuhn dot de
i experienced the same problem.
this behaviour is caused through the user function call executed in shift_entry of class search:
call_user_func(array($this, 'shiftEntry'), $args)
the function call must receive the object ($this) as a reference in order to be able to overwrite the variable $this->_elink. (_elink is used to call ldap_next_entry if not null)
therefor the correct way to call the function is this:
call_user_func(array(&$this, 'shiftEntry'), $args)
this error (no explicit referencing of $this) can be found in various other function pairs in Net_LDAP.
[2005-09-19 10:24 UTC] fw at weisshuhn dot de
i meant call_user_func_array instead of in my above lines of code.
[2005-09-19 10:31 UTC] jw at php dot net
Well this seems to be connected to bug #2860. Since call time pass reference is depreciated now, what to do?
[2005-10-31 13:33 UTC] b dot hallinger at ergonaz dot net
It will work with
return call_user_func_array(array(&$this, 'shiftEntry'), $args);
instead of
return call_user_func_array(array($this, 'shiftEntry'), $args);
I don't know if this has been fixed already or if there is another, better solution to this.
[2006-02-24 02:40 UTC] delatbabel at php dot net
Verified that this now works in the CVS HEAD revision.
Note this is in Net/LDAP/Search.php.
[2006-02-24 02:41 UTC] delatbabel at php dot net
Verified that this now works in the CVS HEAD revision.
[2006-02-24 03:42 UTC] delatbabel at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.