|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-22 11:38 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
Description: ------------ tmpfile() still uses the old parameter parsing stuff..so an incomplete warning is issued when the function is called with parameters. fix: cvs diff: Diffing ext/standard Index: ext/standard/file.c =================================================================== RCS file: /repository/php-src/ext/standard/file.c,v retrieving revision 1.409.2.6.2.28.2.35 diff -u -p -r1.409.2.6.2.28.2.35 file.c --- ext/standard/file.c 24 May 2009 16:01:47 -0000 1.409.2.6.2.28.2.35 +++ ext/standard/file.c 22 Jun 2009 11:14:39 -0000 @@ -869,8 +869,8 @@ PHP_NAMED_FUNCTION(php_if_tmpfile) { php_stream *stream; - if (ZEND_NUM_ARGS() != 0) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters_none() == FAILURE) { + return; } stream = php_stream_fopen_tmpfile(); Reproduce code: --------------- php -r 'var_dump(tmpfile(0));' Expected result: ---------------- Warning: tmpfile() expects exactly 0 parameters, 1 given in Command line code on line 1 NULL Actual result: -------------- Warning: Wrong parameter count for tmpfile() in Command line code on line 1 NULL