php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28300 inconsistent __autoload parameret pass with stream_wrapper_register
Submitted: 2004-05-06 14:08 UTC Modified: 2004-05-06 16:30 UTC
From: buri dot peter at trilogic dot hu Assigned:
Status: Closed Package: *General Issues
PHP Version: 5CVS-2004-05-06 (dev) OS: Windows XP
Private report: No CVE-ID: None
 [2004-05-06 14:08 UTC] buri dot peter at trilogic dot hu
Description:
------------
stream_wrapper_register( 'var', 'VariableStream' );

__autoload get 'variablestream' as parameter [ in lower case ]

but in other situation:
new VariableStream();

__autoload get 'VariableStream' as parameter.

this is inconsistent. 

I prefer the case sensitive way. :)


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

VariableStream2.class.php:
<?php 
class VariableStream2 {
    function __call() {}
}
?>

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

stream_wrapper_register( 'var', 'VariableStream' );
new VariableStream2();

?>

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

Actual result:
--------------
variablestream
VariableStream2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-06 16:30 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.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC