php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28287 stream_wrapper_register doesn't call __autoload
Submitted: 2004-05-05 17:36 UTC Modified: 2004-05-05 20:20 UTC
From: buri dot peter at trilogic dot hu Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.0.0RC2 OS: Windows XP
Private report: No CVE-ID: None
 [2004-05-05 17:36 UTC] buri dot peter at trilogic dot hu
Description:
------------
stream_wrapper_register does not call the new __autoload function of Zend Engine 2.

Reproduce code:
---------------
VariableStream.class.php:
<?php 
class VariableStream {
    function __call() {}
}
?>

index.php:
<?php
function __autoload( $class ) {
    echo $class;
    include_once( $class . '.class.php' );
}

stream_wrapper_register( 'var', 'VariableStream' );
?>

Expected result:
----------------
VariableStream

Actual result:
--------------
Warning: stream_wrapper_register() [function.stream-wrapper-register]: class 'VariableStream' is undefined in index.php on line 6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-05 20:20 UTC] pollita@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

stream_filter_register() got fixed in this patch as well.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC