diff options
Diffstat (limited to 'ext/standard/streamsfuncs.c')
-rw-r--r-- | ext/standard/streamsfuncs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 0e5d0ce79e..584d10dd87 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -322,7 +322,7 @@ PHP_FUNCTION(stream_socket_get_name) if (0 != php_stream_xport_get_name(stream, want_peer, &name, NULL, NULL - )) { + ) || !name) { RETURN_FALSE; } @@ -438,13 +438,13 @@ PHP_FUNCTION(stream_get_contents) if (seek_res != 0) { php_error_docref(NULL, E_WARNING, - "Failed to seek to position %pd in the stream", desiredpos); + "Failed to seek to position " ZEND_LONG_FMT " in the stream", desiredpos); RETURN_FALSE; } } if (maxlen > INT_MAX) { - php_error_docref(NULL, E_WARNING, "maxlen truncated from %pd to %d bytes", maxlen, INT_MAX); + php_error_docref(NULL, E_WARNING, "maxlen truncated from " ZEND_LONG_FMT " to %d bytes", maxlen, INT_MAX); maxlen = INT_MAX; } if ((contents = php_stream_copy_to_mem(stream, maxlen, 0))) { |