Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.2

Bug #8554 Raises Exception for Dynamically Dispatched Functions
Submitted: 2006-08-24 20:57 UTC
From: ripta dot pasay at lunarpages dot com Assigned: jespino
Status: Closed Package: PHP_Shell (version 0.3.0)
PHP Version: 5.1.4 OS: CentOS release 3.5 (Final)
Roadmaps: (Not assigned)    
Subscription  


 [2006-08-24 20:57 UTC] ripta dot pasay at lunarpages dot com (Ripta Pasay)
Description: ------------ When function calls are handled by __call (PHP 5.x only), PHPShell will raise an Exception on line 346, because it uses method_exists() to check whether the function exists or not. Using is_callable() instead of method_exists() will handle __call()s correctly. A down side: is_callable() seems to always return TRUE if __call() exists. Test script: --------------- class Test { public function __call($methodName, $argList) { echo "$methodName called\n"; } } $t = new Test(); $t->doIt(); Expected result: ---------------- doIt called Actual result: -------------- Exception (code: 0) got thrown exception 'Exception' with message 'Variable $t (Class 'Test') doesn't have a method named 'doIt'' in /usr/local/lib/php/PHP/Shell.php:346 Stack trace: #0 /usr/local/lib/php/php-shell-cmd.php(116): PHP_Shell->parse() #1 {main}

Comments

 [2006-10-18 20:33 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2010-08-08 21:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!