php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33853 php:function call __autoload with lowercase param
Submitted: 2005-07-25 20:27 UTC Modified: 2005-07-25 23:08 UTC
From: pasha dot zubkov at gmail dot com Assigned: helly (profile)
Status: Closed Package: XSLT related
PHP Version: 5.0.4 OS: *
Private report: No CVE-ID: None
 [2005-07-25 20:27 UTC] pasha dot zubkov at gmail dot com
Description:
------------
See example

Reproduce code:
---------------
<?php

function __autoload($className) {
        var_dump($className);
	exit();
}

$xsl = new DomDocument();
$xsl->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
<xsl:template match="/">
<xsl:value-of select="php:function(\'TeSt::dateLang\')" />
</xsl:template>
</xsl:stylesheet>');
$inputdom = new DomDocument();
$inputdom->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
<today></today>');

$proc = new XsltProcessor();
$proc->registerPhpFunctions();
$xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($inputdom);
?>

Expected result:
----------------
string(4) "TeSt"

Actual result:
--------------
string(4) "test"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-25 20:34 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-07-25 20:45 UTC] tony2001@php.net
It seems to be related to XSLT indeed, as I can't reproduce it with 5.0.4/5.1-dev with this code:
<?php
function __autoload($className) {
        var_dump($className);
        exit();
}
$test = new MyClass;
?>
 [2005-07-25 23:08 UTC] helly@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.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=6b5fcd3f61b22365e18686c70265531493b870b7
Log: fix #33853 and a user note: missing description &amp; changelog for the autoload parameter
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC