From: Nikita Popov Date: Wed, 12 Jun 2019 11:18:04 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eea206a06c6fcbcbabc590d287dc529588520095;p=php Merge branch 'PHP-7.4' --- eea206a06c6fcbcbabc590d287dc529588520095 diff --cc ext/standard/file.c index 32f21fbb0a,a651c8744c..cf11faea91 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@@ -694,10 -694,10 +694,10 @@@ PHP_FUNCTION(file_put_contents if (Z_OBJ_HT_P(data) != NULL) { zval out; - if (zend_std_cast_object_tostring(data, &out, IS_STRING) == SUCCESS) { + if (zend_std_cast_object_tostring(Z_OBJ_P(data), &out, IS_STRING) == SUCCESS) { numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out)); if (numbytes != Z_STRLEN(out)) { - php_error_docref(NULL, E_WARNING, "Only "ZEND_LONG_FMT" of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN(out)); + php_error_docref(NULL, E_WARNING, "Only %zd of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN(out)); numbytes = -1; } zval_ptr_dtor_str(&out);