php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48800 autoload does not strip leading T_NS_SEPARATOR
Submitted: 2009-07-05 05:18 UTC Modified: 2009-07-05 05:20 UTC
From: greg at chiaraquartet dot net Assigned: dmitry (profile)
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.0 OS:
Private report: No CVE-ID: None
 [2009-07-05 05:18 UTC] greg at chiaraquartet dot net
Description:
------------
If attempts to instantiate \class\name and class\name are made, autoload is called twice.

Reproduce code:
---------------
<?php
namespace foo;
function __autoload($class)
{
var_dump($class);
eval('namespace ' . $GLOBALS['ns'] . ';class ' . $GLOBALS['class'] . '{}');
}
spl_autoload_register('foo\__autoload');
$ns = 'test';
$class = 'this';
class_exists('\test\this', true);

$a = new \test\this;
$a = new test\this;



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-05 05:20 UTC] cellog@php.net
several problems between operator and keyboard
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 08:01:28 2024 UTC