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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: greg at chiaraquartet dot net
New email:
PHP Version: OS:

 

 [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 09:01:30 2024 UTC