From: thierry dot graff at laposte dot net
Operating system: windows XP pro
PHP version: 4.3.3
PHP Bug Type: Reproducible crash
Bug description: not reporting wrong parameter count

Description:
------------
The following call :
$matches = preg_match_all($pattern, $str);
will not lead to an error message saying that one parameter is missing,
but the interpreter crashes, and the following message is displayed :
"CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:"
(no header specified in the message)

The correct call :
preg_match_all($pattern, $str, $matches);
works properly.



Reproduce code:
---------------
$matches = preg_match_all($pattern, $str);

Expected result:
----------------
Warning: Wrong parameter count for preg_match_all()

Actual result:
--------------
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:

--
Edit bug report at [url]http://bugs.php.net/?id=25504&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25504&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25504&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25504&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25504&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25504&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25504&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25504&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25504&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25504&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25504&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25504&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25504&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25504&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25504&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25504&r=gnused[/url]