ID: 35539
User updated by: marcing at smlw dot pl
Reported By: marcing at smlw dot pl
-Status: Feedback
+Status: Open
Bug Type: Unknown/Other Function
Operating System: Win XP
PHP Version: 5CVS-2005-12-04 (snap)
New Comment:
You r right judas, thanks
Previous Comments:
------------------------------------------------------------------------
[2005-12-04 02:22:49] judas dot iscariote at gmail dot com
the problem is the error message.
pass incorrect data type in:
Parameter #1 [ <required> $code ]
OR
Parameter #2 [ <required> $severity ]
and you'll see:
Fatal error: Wrong parameter count for exception...
maybe the error message should tell something different...
------------------------------------------------------------------------
[2005-12-04 01:32:04] [EMAIL PROTECTED]
./sapi/cli/php -r 'throw new ErrorException($msg, $code, $severity,
$file, $line);'
Fatal error: Uncaught exception 'ErrorException' in :0
Stack trace:
#0 {main}
thrown in on line 0
./sapi/cli/php -v
PHP 5.1.2-dev (cli) (built: Dec 4 2005 02:47:57)
Do you have any Zend extensions enabled like APC, IonCube, eAccelerator
etc. ?
------------------------------------------------------------------------
[2005-12-04 01:07:06] judas dot iscariote at gmail dot com
php t.php
PHP Fatal error: Wrong parameter count for exception([string
$exception [, long $code ]]) in t.php on line 2
X-Powered-By: PHP/5.1.2-dev
Linux amd64.
------------------------------------------------------------------------
[2005-12-04 00:54:35] [EMAIL PROTECTED]
I can't reproduce it.
Could you try on some different machine? (a *nix would be better)
------------------------------------------------------------------------
[2005-12-04 00:38:45] marcing at smlw dot pl
Description:
------------
thrown ErrorException accepts 2 arguments instead of 5
Reproduce code:
---------------
throw new ErrorException($msg, $code, $severity, $file, $line);
Expected result:
----------------
ErrorException should accept 5 arguments:
Method [ <internal> <ctor> public method __construct ] {
- Parameters [5] {
Parameter #0 [ <required> $message ]
Parameter #1 [ <required> $code ]
Parameter #2 [ <required> $severity ]
Parameter #3 [ <optional> $filename ]
Parameter #4 [ <optional> $lineno ]
}
Actual result:
--------------
Fatal error: Wrong parameter count for exception([string $exception [,
long $code ]])
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35539&edit=1