|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-22 15:41 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 04:00:01 2025 UTC |
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