Bug #65999 [Opn]: autoloading of aliased namespaced classes fails when including twice a file
| From: | giunta dot gaetano at gmail dot com | Date: | Wed, 30 Oct 2013 10:50:08 +0000 |
| Subject: | Bug #65999 [Opn]: autoloading of aliased namespaced classes fails when including twice a file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182492@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65999&edit=1
ID: 65999
User updated by: giunta dot gaetano at gmail dot com
Reported by: giunta dot gaetano at gmail dot com
-Summary: autoloading of alaised namespaced classes fails when
including twice a file
+Summary: autoloading of aliased namespaced classes fails when
including twice a file
Status: Open
Type: Bug
Package: *General Issues
Operating System: win7 64bit
PHP Version: 5.4.21
Block user comment: N
Private report: N
New Comment:
[edited bug name]
Previous Comments:
------------------------------------------------------------------------
[2013-10-30 10:49:20] giunta dot gaetano at gmail dot com
Description:
------------
Imagine the following situation:
- file X.php has a USE statement aliasing a class name A\B\C as D
- it includes other files, which set up autoloading, then require X.php again
- when X.php is reincluded, it executes some code, using an object: $x = new D()
In this case, the functions registered for class autoloading will get passed the string
'D' instead of 'A\B\C'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65999&edit=1