PHP :: Bug #29210 :: Function: is_callable
| Bug #29210 | Function: is_callable - no support for private and protected classes | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2004-07-16 15:07 UTC | Modified: | 2005-04-27 17:46 UTC |
|
||||||||||
| From: | freeload at softhome dot net | Assigned: | andi (profile) | |||||||||||
| Status: | Closed | Package: | Scripting Engine problem | |||||||||||
| PHP Version: | 5CVS-2005-03-07 | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2004-07-16 15:07 UTC] freeload at softhome dot net
Description:
------------
The built in function is_callable, does not return false, on unreachable functions like protected and private ones.
Reproduce code:
---------------
<?php
class test_class {
private function test_func1(){}
protected function test_func2(){}
}
$object = new test_class;
var_dump(is_callable(array($object,'test_func1')));
echo chr(10);
var_dump(is_callable(array($object,'test_func2')));
?>
Expected result:
----------------
bool(false)
bool(false)
Actual result:
--------------
bool(true)
bool(true)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits