ID: 42118
Updated by: [EMAIL PROTECTED]
Reported By: dinesh at dinsoft dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows
PHP Version: 5.2.3
New Comment:
You don't have class called "string" set, do you?
There is no type hinting for "string" type in PHP..
Previous Comments:
------------------------------------------------------------------------
[2007-07-27 00:21:11] dinesh at dinsoft dot net
It is actually not restricted to classes and stream_wrapper_register.
------------------------------------------------------------------------
[2007-07-27 00:15:32] dinesh at dinsoft dot net
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 this bug report at http://bugs.php.net/?id=42118&edit=1