felipe Tue Aug 12 19:38:05 2008 UTC Modified files: /php-src/ext/standard file.c /php-src/ext/standard/tests/file 007_error.phpt fflush_error.phpt fgetc_error.phpt fgetss_error.phpt fseek_ftell_rewind_error1.phpt fseek_ftell_rewind_error2.phpt fseek_ftell_rewind_error3.phpt ftruncate_error.phpt popen_pclose_error.phpt umask_error.phpt Log: - New parameter parsing API
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.524&r2=1.525&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.524 php-src/ext/standard/file.c:1.525 --- php-src/ext/standard/file.c:1.524 Mon Aug 11 13:14:01 2008 +++ php-src/ext/standard/file.c Tue Aug 12 19:38:04 2008 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.524 2008/08/11 13:14:01 pajoye Exp $ */ +/* $Id: file.c,v 1.525 2008/08/12 19:38:04 felipe Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1007,14 +1007,14 @@ Close an open file pointer */ PHPAPI PHP_FUNCTION(fclose) { - zval **arg1; + zval *arg1; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a valid stream resource", stream->rsrc_id); @@ -1081,14 +1081,14 @@ Close a file pointer opened by popen() */ PHP_FUNCTION(pclose) { - zval **arg1; + zval *arg1; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); zend_list_delete(stream->rsrc_id); RETURN_LONG(FG(pclose_ret)); @@ -1099,14 +1099,14 @@ Test for end-of-file on a file pointer */ PHPAPI PHP_FUNCTION(feof) { - zval **arg1; + zval *arg1; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); if (php_stream_eof(stream)) { RETURN_TRUE; @@ -1171,14 +1171,14 @@ Get a character from file pointer */ PHPAPI PHP_FUNCTION(fgetc) { - zval **arg1; + zval *arg1; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); if (stream->readbuf_type == IS_UNICODE) { int buflen = 1; @@ -1285,30 +1285,19 @@ Implements a mostly ANSI compatible fscanf() */ PHP_FUNCTION(fscanf) { - int result; - zval **file_handle, **format_string; - int type; + int type, result, argc = 0; + zval ***args = NULL; + zval **format; + zval *file_handle; char *buf; UChar *u_buf; void *what; - zval ***args; - int argCount; - - argCount = ZEND_NUM_ARGS(); - if (argCount < 2) { - WRONG_PARAM_COUNT; - } - args = (zval ***)safe_emalloc(argCount, sizeof(zval **), 0); - if (zend_get_parameters_array_ex(argCount, args) == FAILURE) { - efree( args ); - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rZ*", &file_handle, &format, &args, &argc) == FAILURE) { + return; } - file_handle = args[0]; - format_string = args[1]; - - what = zend_fetch_resource(file_handle TSRMLS_CC, -1, "File-Handle", &type, 2, php_file_le_stream(), php_file_le_pstream()); + what = zend_fetch_resource(&file_handle TSRMLS_CC, -1, "File-Handle", &type, 2, php_file_le_stream(), php_file_le_pstream()); /* * we can't do a ZEND_VERIFY_RESOURCE(what), otherwise we end up @@ -1316,38 +1305,45 @@ * if the code behind ZEND_VERIFY_RESOURCE changed. - cc */ if (!what) { - efree(args); + if (args) { + efree(args); + } RETURN_FALSE; } if (((php_stream *)what)->readbuf_type == IS_UNICODE) { u_buf = php_stream_u_get_line((php_stream *) what, NULL_ZSTR, 0, 0, NULL); if (u_buf == NULL) { - efree(args); + if (args) { + efree(args); + } RETURN_FALSE; } - convert_to_unicode_ex(format_string); - result = php_u_sscanf_internal(u_buf, Z_USTRVAL_PP(format_string), argCount, args, 2, &return_value TSRMLS_CC); + convert_to_unicode_ex(format); + result = php_u_sscanf_internal(u_buf, Z_USTRVAL_PP(format), argc, args, 0, &return_value TSRMLS_CC); efree(u_buf); } else { buf = php_stream_get_line((php_stream *) what, NULL_ZSTR, 0, NULL); if (buf == NULL) { - efree(args); + if (args) { + efree(args); + } RETURN_FALSE; } - convert_to_string_ex(format_string); - result = php_sscanf_internal(buf, Z_STRVAL_PP(format_string), argCount, args, 2, &return_value TSRMLS_CC); + convert_to_string_ex(format); + result = php_sscanf_internal(buf, Z_STRVAL_PP(format), argc, args, 0, &return_value TSRMLS_CC); efree(buf); } - efree(args); + if (args) { + efree(args); + } if (SCAN_ERROR_WRONG_PARAM_COUNT == result) { WRONG_PARAM_COUNT; } - } /* }}} */ @@ -1404,15 +1400,15 @@ Flushes output */ PHPAPI PHP_FUNCTION(fflush) { - zval **arg1; + zval *arg1; int ret; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); ret = php_stream_flush(stream); if (ret) { @@ -1426,14 +1422,14 @@ Rewind the position of a file pointer */ PHPAPI PHP_FUNCTION(rewind) { - zval **arg1; + zval *arg1; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); if (-1 == php_stream_rewind(stream)) { RETURN_FALSE; @@ -1446,15 +1442,15 @@ Get file pointer's read/write position */ PHPAPI PHP_FUNCTION(ftell) { - zval **arg1; + zval *arg1; long ret; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); ret = php_stream_tell(stream); if (ret == -1) { @@ -1468,23 +1464,22 @@ Seek on a file pointer */ PHPAPI PHP_FUNCTION(fseek) { - zval **arg1, **arg2, **arg3; - int argcount = ZEND_NUM_ARGS(), whence = SEEK_SET; + zval *arg1; + long arg2, arg3; + int whence = SEEK_SET, argcount = ZEND_NUM_ARGS(); php_stream *stream; - if (argcount < 2 || argcount > 3 || zend_get_parameters_ex(argcount, &arg1, &arg2, &arg3) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(argcount TSRMLS_CC, "rl|l", &arg1, &arg2, &arg3) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); - convert_to_long_ex(arg2); if (argcount > 2) { - convert_to_long_ex(arg3); - whence = Z_LVAL_PP(arg3); + whence = arg3; } - RETURN_LONG(php_stream_seek(stream, Z_LVAL_PP(arg2), whence)); + RETURN_LONG(php_stream_seek(stream, arg2, whence)); } /* }}} */ @@ -1603,7 +1598,7 @@ Return or change the umask */ PHP_FUNCTION(umask) { - zval **arg1; + long arg1; int oldumask; int arg_count = ZEND_NUM_ARGS(); @@ -1612,15 +1607,15 @@ if (BG(umask) == -1) { BG(umask) = oldumask; } + + if (zend_parse_parameters(arg_count TSRMLS_CC, "|l", &arg1) == FAILURE) { + return; + } if (arg_count == 0) { umask(oldumask); } else { - if (arg_count > 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_long_ex(arg1); - umask(Z_LVAL_PP(arg1)); + umask(arg1); } RETURN_LONG(oldumask); @@ -1631,15 +1626,15 @@ Output all remaining data from a file pointer */ PHPAPI PHP_FUNCTION(fpassthru) { - zval **arg1; + zval *arg1; int size; php_stream *stream; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, arg1); + PHP_STREAM_TO_ZVAL(stream, &arg1); size = php_stream_passthru(stream); RETURN_LONG(size); @@ -1728,23 +1723,22 @@ Truncate file to 'size' length */ PHP_NAMED_FUNCTION(php_if_ftruncate) { - zval **fp , **size; + zval *fp; + long size; php_stream *stream; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fp, &size) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &fp, &size) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, fp); - - convert_to_long_ex(size); + PHP_STREAM_TO_ZVAL(stream, &fp); if (!php_stream_truncate_supported(stream)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't truncate this stream!"); RETURN_FALSE; } - RETURN_BOOL(0 == php_stream_truncate_set_size(stream, Z_LVAL_PP(size))); + RETURN_BOOL(0 == php_stream_truncate_set_size(stream, size)); } /* }}} */ @@ -1752,7 +1746,7 @@ Stat() on a filehandle */ PHP_NAMED_FUNCTION(php_if_fstat) { - zval **fp; + zval *fp; zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev, *stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks; php_stream *stream; @@ -1762,11 +1756,11 @@ "size", "atime", "mtime", "ctime", "blksize", "blocks" }; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &fp) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &fp) == FAILURE) { + return; } - PHP_STREAM_TO_ZVAL(stream, fp); + PHP_STREAM_TO_ZVAL(stream, &fp); if (php_stream_stat(stream, &stat_ssb)) { RETURN_FALSE; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/007_error.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/standard/tests/file/007_error.phpt diff -u php-src/ext/standard/tests/file/007_error.phpt:1.4 php-src/ext/standard/tests/file/007_error.phpt:1.5 --- php-src/ext/standard/tests/file/007_error.phpt:1.4 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/007_error.phpt Tue Aug 12 19:38:05 2008 @@ -77,28 +77,28 @@ Warning: fclose(): 5 is not a valid stream resource in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -Warning: Wrong parameter count for fclose() in %s on line %d +Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d NULL Warning: feof(): 5 is not a valid stream resource in %s on line %d bool(false) -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -Warning: Wrong parameter count for feof() in %s on line %d +Warning: feof() expects exactly 1 parameter, 0 given in %s on line %d NULL Warning: fopen() expects at most 4 parameters, 5 given in %s on line %d bool(false) -Warning: Wrong parameter count for fclose() in %s on line %d +Warning: fclose() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for feof() in %s on line %d +Warning: feof() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing fopen(), fclose() & feof() with invalid arguments -- -- Iteration 1 -- @@ -106,41 +106,41 @@ Warning: fopen(string): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- Warning: fopen(10): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, integer given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- Warning: fopen(10.5): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, double given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- Warning: fopen(1): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- Notice: Array to string conversion in %s on line %d @@ -148,24 +148,24 @@ Warning: fopen(Array): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, array given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, null given in %s on line %d +NULL -- Iteration 7 -- bool(false) -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -Warning: feof(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_error.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/file/fflush_error.phpt diff -u php-src/ext/standard/tests/file/fflush_error.phpt:1.3 php-src/ext/standard/tests/file/fflush_error.phpt:1.4 --- php-src/ext/standard/tests/file/fflush_error.phpt:1.3 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/fflush_error.phpt Tue Aug 12 19:38:05 2008 @@ -54,36 +54,36 @@ *** Testing error conditions *** -- Testing fflush(): with zero argument -- -Warning: Wrong parameter count for fflush() in %s on line %d +Warning: fflush() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing fflush(): with more than expected number of arguments -- -Warning: Wrong parameter count for fflush() in %s on line %d +Warning: fflush() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing fflush(): with invalid arguments -- -- Iteration 1 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fflush() expects parameter 1 to be resource, object given in %s on line %d +NULL *** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetc_error.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/file/fgetc_error.phpt diff -u php-src/ext/standard/tests/file/fgetc_error.phpt:1.3 php-src/ext/standard/tests/file/fgetc_error.phpt:1.4 --- php-src/ext/standard/tests/file/fgetc_error.phpt:1.3 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/fgetc_error.phpt Tue Aug 12 19:38:05 2008 @@ -39,35 +39,35 @@ *** Testing error conditions *** -- Testing fgetc() with zero argument -- -Warning: Wrong parameter count for fgetc() in %s on line %d +Warning: fgetc() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing fgetc() with more than expected number of arguments -- -Warning: Wrong parameter count for fgetc() in %s on line %d +Warning: fgetc() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing fgetc() with invalid arguments -- -- Iteration 1 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fgetc() expects parameter 1 to be resource, object given in %s on line %d +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_error.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/file/fgetss_error.phpt diff -u php-src/ext/standard/tests/file/fgetss_error.phpt:1.3 php-src/ext/standard/tests/file/fgetss_error.phpt:1.4 --- php-src/ext/standard/tests/file/fgetss_error.phpt:1.3 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/fgetss_error.phpt Tue Aug 12 19:38:05 2008 @@ -105,6 +105,6 @@ Warning: fgetss() expects parameter 1 to be resource, null given in %s on line %d NULL -Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt diff -u php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.2 php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.3 --- php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.2 Tue May 27 09:34:53 2008 +++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt Tue Aug 12 19:38:05 2008 @@ -56,44 +56,44 @@ *** Testing fseek() : error conditions *** -- Testing fseek() with zero argument -- -Warning: Wrong parameter count for fseek() in %s on line %d +Warning: fseek() expects at least 2 parameters, 0 given in %s on line %d NULL -- Testing fseek() with unexpected number of arguments -- -Warning: Wrong parameter count for fseek() in %s on line %d +Warning: fseek() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for fseek() in %s on line %d +Warning: fseek() expects at most 3 parameters, 4 given in %s on line %d NULL -- Testing fseek() with invalid arguments -- -- Iteration 1 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, object given in %s on line %d +NULL -- Testing fseek() with closed/unset file handle -- Warning: fseek(): 5 is not a valid stream resource in %s on line %d bool(false) -Warning: fseek(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: fseek() expects parameter 1 to be resource, null given in %s on line %d +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt diff -u php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.2 php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.3 --- php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.2 Tue May 27 09:34:53 2008 +++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt Tue Aug 12 19:38:05 2008 @@ -55,41 +55,41 @@ *** Testing ftell() : error conditions *** -- Testing ftell() with zero argument -- -Warning: Wrong parameter count for ftell() in %s on line %d +Warning: ftell() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing ftell() with more than expected number of arguments -- -Warning: Wrong parameter count for ftell() in %s on line %d +Warning: ftell() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing ftell() with invalid arguments -- -- Iteration 1 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, object given in %s on line %d +NULL -- Testing ftell with closed/unset file handle -- Warning: ftell(): 5 is not a valid stream resource in %s on line %d bool(false) -Warning: ftell(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftell() expects parameter 1 to be resource, null given in %s on line %d +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt diff -u php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.2 php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.3 --- php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.2 Tue May 27 09:34:53 2008 +++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt Tue Aug 12 19:38:05 2008 @@ -55,41 +55,41 @@ *** Testing rewind() : error conditions *** -- Testing rewind() with zero argument -- -Warning: Wrong parameter count for rewind() in %s on line %d +Warning: rewind() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing rewind() with more than expected number of arguments -- -Warning: Wrong parameter count for rewind() in %s on line %d +Warning: rewind() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing rewind() with invalid arguments -- -- Iteration 1 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, object given in %s on line %d +NULL -- Testing rewind() with closed/unset file handle -- Warning: rewind(): 5 is not a valid stream resource in %s on line %d bool(false) -Warning: rewind(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: rewind() expects parameter 1 to be resource, null given in %s on line %d +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/ftruncate_error.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/ftruncate_error.phpt diff -u php-src/ext/standard/tests/file/ftruncate_error.phpt:1.2 php-src/ext/standard/tests/file/ftruncate_error.phpt:1.3 --- php-src/ext/standard/tests/file/ftruncate_error.phpt:1.2 Tue May 27 09:34:53 2008 +++ php-src/ext/standard/tests/file/ftruncate_error.phpt Tue Aug 12 19:38:05 2008 @@ -76,49 +76,49 @@ Initial file size = 36 -- Testing ftruncate() with less than expected number of arguments -- -Warning: Wrong parameter count for ftruncate() in %s on line %d +Warning: ftruncate() expects exactly 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for ftruncate() in %s on line %d +Warning: ftruncate() expects exactly 2 parameters, 1 given in %s on line %d NULL int(36) -- Testing ftruncate() with more than expected number of arguments -- -Warning: Wrong parameter count for ftruncate() in %s on line %d +Warning: ftruncate() expects exactly 2 parameters, 3 given in %s on line %d NULL int(36) -- Testing ftruncate() with invalid file pointer -- -- Iteration 1 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, Unicode string given in %s on line %d +NULL -- Iteration 2 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, double given in %s on line %d +NULL -- Iteration 4 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, boolean given in %s on line %d +NULL -- Iteration 5 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, array given in %s on line %d +NULL -- Iteration 6 -- -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, object given in %s on line %d +NULL -- Testing ftruncate() with closed/unset file handle -- Warning: ftruncate(): 5 is not a valid stream resource in %s on line %d bool(false) int(36) -Warning: ftruncate(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: ftruncate() expects parameter 1 to be resource, null given in %s on line %d +NULL int(36) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/standard/tests/file/popen_pclose_error.phpt diff -u php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.4 php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.5 --- php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.4 Tue May 27 09:34:54 2008 +++ php-src/ext/standard/tests/file/popen_pclose_error.phpt Tue Aug 12 19:38:05 2008 @@ -41,16 +41,16 @@ Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: popen(abc.txt,rw): %s on line %d +Warning: popen(abc.txt,rw): Invalid argument in %s on line %d bool(false) -Warning: Wrong parameter count for pclose() in %s on line %d +Warning: pclose() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for pclose() in %s on line %d +Warning: pclose() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: pclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) +Warning: pclose() expects parameter 1 to be resource, integer given in %s on line %d +NULL --- Done --- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_error.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/standard/tests/file/umask_error.phpt diff -u php-src/ext/standard/tests/file/umask_error.phpt:1.4 php-src/ext/standard/tests/file/umask_error.phpt:1.5 --- php-src/ext/standard/tests/file/umask_error.phpt:1.4 Tue May 27 09:34:55 2008 +++ php-src/ext/standard/tests/file/umask_error.phpt Tue Aug 12 19:38:05 2008 @@ -21,6 +21,6 @@ --EXPECTF-- *** Testing umask() : error conditions *** -Warning: Wrong parameter count for umask() in %s on line %d +Warning: umask() expects at most 1 parameter, 2 given in %s on line %d NULL Done
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php