. Fixed bug #80077 (getmxrr test bug). (Rainer Jung)
. Fixed bug #72941 (Modifying bucket->data by-ref has no effect any longer).
(cmb)
+ . Fixed bug #80067 (Omitting the port in bindto setting errors). (cmb)
03 Sep 2020, PHP 7.3.22
);
?>
--EXPECTF--
-Warning: stream_socket_client(): unable to connect to tcp://%s:80 (Failed to parse address "invalid") in %s on line %d
+Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: %s in %s on line %d
+
+Warning: stream_socket_client(): unable to connect to tcp://www.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com:80 (php_network_getaddresses: getaddrinfo failed: %s) in %s on line %d
--- /dev/null
+--TEST--
+Bug #80067 (Omitting the port in bindto setting errors)
+--SKIPIF--
+<?php
+if (getenv("SKIP_ONLINE_TESTS")) die('skip online test');
+?>
+--FILE--
+<?php
+$context = stream_context_create(['socket' => ['bindto' => '0']]);
+var_dump(file_get_contents('https://httpbin.org/get', false, $context) !== false);
+?>
+--EXPECT--
+bool(true)
if ((n = getaddrinfo(host, NULL, &hints, &res))) {
if (error_string) {
+ /* free error string received during previous iteration (if any) */
+ if (*error_string) {
+ zend_string_release_ex(*error_string, 0);
+ }
*error_string = strpprintf(0, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(*error_string));
} else {
return 0;
} else if (res == NULL) {
if (error_string) {
+ /* free error string received during previous iteration (if any) */
+ if (*error_string) {
+ zend_string_release_ex(*error_string, 0);
+ }
*error_string = strpprintf(0, "php_network_getaddresses: getaddrinfo failed (null result pointer) errno=%d", errno);
php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(*error_string));
} else {
}
if (host_info == NULL) {
if (error_string) {
+ /* free error string received during previous iteration (if any) */
+ if (*error_string) {
+ zend_string_release_ex(*error_string, 0);
+ }
*error_string = strpprintf(0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno);
php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(*error_string));
} else {