ID: 44966
Comment by: zeeky dot h at gmail dot com
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Operating System: irrelevant
PHP Version: 5.3CVS-2008-05-11 (CVS)
New Comment:
eval is not a function. Therefore it cannot be disabled or reflected.
Previous Comments:
------------------------------------------------------------------------
[2008-05-11 05:10:51] [EMAIL PROTECTED]
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 this bug report at http://bugs.php.net/?id=44966&edit=1