#38183 [Opn->Csd]: disable_classes=Directory introduces new class "dir"?
| From: | sniper@php.net | Date: | Sat, 22 Jul 2006 15:41:55 +0000 |
| Subject: | #38183 [Opn->Csd]: disable_classes=Directory introduces new class "dir"? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99752@lists.php.net to get a copy of this message | ||
ID: 38183
Updated by: sniper@php.net
Reported By: ch at hoffie dot info
-Status: Open
+Status: Closed
Bug Type: PHP options/info functions
Operating System: Linux 2.6
PHP Version: 5.1.4
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2006-07-21 22:38:35] ch at hoffie dot info
Description:
------------
With disable_classes=Directory in the php.ini file,
get_declared_classes() no longer returns the "Directory" class, but a
class called "dir".
[This bug still exists in PHP 5.2, there you could also use "Date"
(which results in "dat") or "Reflection..." (result: "ref") instead of
Directory/dir (so Directory is not an exception, it's a general
issue).]
Reproduce code:
---------------
christian@tux ~ $ echo "disable_classes=Directory" > /tmp/php.ini
christian@tux ~ $ php -c /tmp/php.ini -r
'var_dump(in_array("Directory", get_declared_classes()),
in_array("dir", get_declared_classes())); new dir();'
Expected result:
----------------
bool(true)
bool(false)
Fatal error: Class 'dir' not found in Command line code on line 1
Actual result:
--------------
bool(false)
bool(true)
Warning: directory() has been disabled for security reasons in Command
line code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38183&edit=1