ID: 38183 Updated by: [EMAIL PROTECTED] 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: --------------- [EMAIL PROTECTED] ~ $ echo "disable_classes=Directory" > /tmp/php.ini [EMAIL PROTECTED] ~ $ 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