From: [EMAIL PROTECTED]
Operating system: irrelevant
PHP version: 5.3CVS-2008-05-11 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description: Cannot create ReflectionFunction object for disabled functions
Description:
------------
One cannot create an object of the ReflectionFunction class for a function
that has been disabled via the disable_functions configuration directive.
This effectively renders the ReflectionFunction::isDisabled() method
useless.
Reproduce code:
---------------
--TEST--
ReflectionFunction::isDisabled()
--INI--
disable_functions=eval
--FILE--
<?php
$function = new ReflectionFunction('sort');
var_dump($function->isDisabled());
$function = new ReflectionFunction('eval');
var_dump($function->isDisabled());
?>
--EXPECT--
bool(false)
bool(true)
Expected result:
----------------
Test passes.
Actual result:
--------------
bool(false)
Fatal error: Uncaught exception 'ReflectionException' with message
'Function eval() does not exist' in
/home/sb/ReflectionFunction_isDisabled.php:5
Stack trace:
#0 /home/sb/ReflectionFunction_isDisabled.php(5):
ReflectionFunction->__construct('eval')
#1 {main}
thrown in /home/sb/ReflectionFunction_isDisabled.php on line 5
--
Edit bug report at http://bugs.php.net/?id=44966&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44966&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44966&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44966&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44966&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44966&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44966&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44966&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44966&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44966&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44966&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44966&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44966&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44966&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44966&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44966&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44966&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44966&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44966&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44966&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44966&r=mysqlcfg