initialize srcstream

use different variable in local scope
This commit is contained in:
Antony Dovgal 2006-05-29 10:42:10 +00:00
parent f59d444d8a
commit d5f90c48c7

View File

@ -588,7 +588,7 @@ PHP_FUNCTION(file_put_contents)
zval *zcontext = NULL;
php_stream_context *context = NULL;
char mode[3] = { 'w', 0, 0 };
php_stream *srcstream;
php_stream *srcstream = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tz/|lr!", &filename, &filename_len, &filename_type,
&data, &flags, &zcontext) == FAILURE) {
@ -701,9 +701,9 @@ PHP_FUNCTION(file_put_contents)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write %d characters to %s", ustrlen, filename);
numchars = -1;
} else if (numchars != ustrlen) {
int numchars = u_countChar32(Z_USTRVAL_P(data), numchars);
int written_numchars = u_countChar32(Z_USTRVAL_P(data), numchars);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d characters written, possibly out of free disk space", numchars, ustrlen);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d characters written, possibly out of free disk space", written_numchars, ustrlen);
numchars = -1;
}
}