]> granicus.if.org Git - php/commitdiff
BugFix#28287 stream_*_register() not calling __autoload().
authorSara Golemon <pollita@php.net>
Wed, 5 May 2004 18:18:57 +0000 (18:18 +0000)
committerSara Golemon <pollita@php.net>
Wed, 5 May 2004 18:18:57 +0000 (18:18 +0000)
NEWS
ext/standard/user_filters.c
main/streams/userspace.c

diff --git a/NEWS b/NEWS
index 0391bb245a941ae4e51d3f74d001fb819cc1080d..8c1152219a25db9fd92c0002d97b0793cd737451 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, PHP 5 Release Candidate 3
 - You may now use count() on COM arrays. (Wez)
+- Fixed bug #28287 (stream_*_register() not calling __autoload()). (Sara)
 - Fixed bug #28161 (COM: Array style properties could not be accessed). (Wez)
 - Fixed bug #28125 (ArrayObject leaks when accessing elements). (Marcus)
 - Fixed bug #28099 (ArrayObject doesn't implement ArrayAccess). (Marcus)
index e5289365bbd6309594a3f5282f703d46f7d01093..81a28f61a6b40b9c18004fee7dab57c8dfe39afc 100644 (file)
@@ -280,8 +280,8 @@ static php_stream_filter *user_filter_factory_create(const char *filtername,
 
        /* bind the classname to the actual class */
        if (fdat->ce == NULL) {
-               if (FAILURE == zend_hash_find(EG(class_table), fdat->classname, strlen(fdat->classname)+1,
-                                       (void **)&fdat->ce)) {
+               if (FAILURE == zend_lookup_class(fdat->classname, strlen(fdat->classname),
+                                       (zend_class_entry ***)&fdat->ce TSRMLS_CC)) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING,
                                        "user-filter \"%s\" requires class \"%s\", but that class is not defined",
                                        filtername, fdat->classname);
index 5ed06d344bae596f7162ea330e57843d411f543a..e8b17d63015a4e605152a2df53092131cdd1bb91 100644 (file)
@@ -417,7 +417,7 @@ PHP_FUNCTION(stream_wrapper_register)
        zend_str_tolower(uwrap->classname, classname_len);
        rsrc_id = ZEND_REGISTER_RESOURCE(NULL, uwrap, le_protocols);
        
-       if (zend_hash_find(EG(class_table), uwrap->classname, classname_len + 1, (void**)&uwrap->ce) == SUCCESS) {
+       if (zend_lookup_class(uwrap->classname, classname_len, (zend_class_entry***)&uwrap->ce TSRMLS_CC) == SUCCESS) {
                uwrap->ce = *(zend_class_entry**)uwrap->ce;
                if (php_register_url_stream_wrapper(protocol, &uwrap->wrapper TSRMLS_CC) == SUCCESS) {
                        RETURN_TRUE;