From: dinesh at dinsoft dot net Operating system: Windows PHP version: 5.2.3 PHP Bug Type: Scripting Engine problem Bug description: stream_wrapper_register() with function prototyping with types
Description: ------------ The error message produced by PHP is a non sense. This should just work. Reproduce code: --------------- class DSProxy { function stream_open(string $path, string $mode, int $options, string $opened_path) { return false; } ... } stream_wrapper_register('proxy', 'DSProxy') or die("ERROR: Could not register the proxy protocol!\n"); $fp = fopen('proxy://www.dinsoft.net', 'r'); Expected result: ---------------- I expect it to work, or at least to produce a meaning full error message. Actual result: -------------- PHP Catchable fatal error: Argument 1 passed to DSProxy::stream_open() must be an instance of string, string given in E:\dev\flights\proxy.php on line 8 Catchable fatal error: Argument 1 passed to DSProxy::stream_open() must be an in stance of string, string given in E:\dev\flights\proxy.php on line 8 -- Edit bug report at http://bugs.php.net/?id=42118&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42118&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42118&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42118&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42118&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42118&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42118&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42118&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42118&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42118&r=support Expected behavior: http://bugs.php.net/fix.php?id=42118&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42118&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42118&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42118&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42118&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42118&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42118&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42118&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42118&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42118&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42118&r=mysqlcfg