From:             crrodriguez at opensuse dot org
Operating system: Irrelevant
PHP version:      5.3CVS-2009-06-22 (CVS)
PHP Bug Type:     Filesystem function related
Bug description:  tmpfile() uses old parameter parsing 

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


-- 
Edit bug report at http://bugs.php.net/?id=48641&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48641&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48641&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48641&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48641&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48641&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48641&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48641&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48641&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48641&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48641&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48641&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48641&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48641&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48641&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48641&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48641&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48641&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48641&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48641&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48641&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48641&r=mysqlcfg

Reply via email to