]> granicus.if.org Git - php/commitdiff
Fix for bug #1980
authorZeev Suraski <zeev@php.net>
Sat, 7 Aug 1999 16:32:50 +0000 (16:32 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 7 Aug 1999 16:32:50 +0000 (16:32 +0000)
ChangeLog
ext/ldap/ldap.c

index 6c3cc37d2ae2cb0a0fb12acf9af544990a148635..e5c730f4dcba831754cf53a72607b1b2fc98c4c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ PHP 4.0 CHANGE LOG                                                    ChangeLog
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ??? ?? 1999, Version 4.0 Beta 2
+- Fixed ldap_search(), ldap_read() and ldap_list() (Zeev)
 - Fixed Apache information in phpinfo() (sam@breakfree.com)
 - Improved register_shutdown_function() - you may now supply arguments that
   will be passed to the shutdown function (Zeev)
index 22664840ab5e8608626e849cd468730c5e5daaf3..f3d8db5af1f989c5c80273b6e98c99845e1f2673 100644 (file)
@@ -537,7 +537,7 @@ PHP_FUNCTION(ldap_unbind)
 
 static void php3_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
 {
-       pval *link, *base_dn, *filter, *attrs, *attr;
+       pval *link, *base_dn, *filter, *attrs, **attr;
        char *ldap_base_dn, *ldap_filter;
        LDAP *ldap;
        char **ldap_attrs = NULL; 
@@ -589,8 +589,9 @@ static void php3_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
                                        RETURN_FALSE;
                                        return;
                                }
-                               convert_to_string(attr);
-                               ldap_attrs[i] = attr->value.str.val;
+                               SEPARATE_ZVAL(attr);
+                               convert_to_string(*attr);
+                               ldap_attrs[i] = (*attr)->value.str.val;
                        }
                        ldap_attrs[num_attribs] = NULL;