ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44966 [Opn->Bgs]: Cannot create ReflectionFunction object for disabled functions
by sebastian other posts by this author
May 11 2008 1:45AM messages near this date
#44966 [NEW]: Cannot create ReflectionFunction object for disabled functions | #44966 [Com]: Cannot create ReflectionFunction object for disabled functions
ID:               44966
 Updated by:       sebastian@[...].net
 Reported By:      sebastian@[...].net
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: irrelevant
 PHP Version:      5.3CVS-2008-05-11 (CVS)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:
------------------------------------------------------------------------

[2008-05-11 08:31:48] zeeky dot h at gmail dot com

eval is not a function. Therefore it cannot be disabled or reflected.

------------------------------------------------------------------------

[2008-05-11 05:10:51] sebastian@[...].net

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
Thread:
Sebastian@Php.Net
sebastian
Zeeky Dot H At Gmail Dot Com

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved