History log of /PHP-8.0/ext/standard/streamsfuncs.c (Results 1 – 25 of 318)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 80232de0 01-Oct-2022 Arnaud Le Blanc

Return immediately when FD_SETSIZE is exceeded (#9602)


# 3b7babf9 15-Jul-2022 Heiko Weber

Fix GH-9017: php_stream_sock_open_from_socket could return NULL

Closes GH-9020.


# 1b01bf3a 02-Jul-2021 Nikita Popov

Add missing error condition to stream_context_set_option()

Previously this caused a null pointer dereference if the value
argument was not provided.


# b751c24e 28-May-2021 twosee

Fix argument index in stream_select()

Closes GH-7067.


# 7e947908 28-Jan-2021 Christoph M. Becker

Fix #80654: file_get_contents() maxlen fails above (2**31)-1 bytes

We remove the arbitrary restriction to `INT_MAX`; it is superfluous on
32bit systems where `ZEND_LONG_MAX == INT_MAX` a

Fix #80654: file_get_contents() maxlen fails above (2**31)-1 bytes

We remove the arbitrary restriction to `INT_MAX`; it is superfluous on
32bit systems where `ZEND_LONG_MAX == INT_MAX` anyway, and not useful
on 64bit systems, where larger files should be readable, if the
`memory_limit` is large enough.

Closes GH-6648.

show more ...


# d6fcaf5d 02-Dec-2020 Nikita Popov

Fixed bug #80457

On x32 sizeof(size_t) != sizeof(zend_long), so we need to be
careful with sign extension here.

Patch by bruno dot premont at restena dot lu.


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# 9ef2c5c3 22-Sep-2020 Nikita Popov

stream_get_transports/wrappers cannot return false

These may return an empty array, but not false.


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1
# c37a1cd6 10-Sep-2020 Máté Kocsis

Promote a few remaining errors in ext/standard

Closes GH-6110


# c98d4769 10-Sep-2020 Máté Kocsis

Consolidate new union type ZPP macro names

They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112


Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22
# 2c96780e 20-Aug-2020 Máté Kocsis

Fix UNKNOWN default values in ext/standard

Closes GH-6026


# 8107a1da 04-Sep-2020 Máté Kocsis

Use ZPP instead of custom type checks

We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068


# 4a438b44 03-Sep-2020 George Peter Banyard

Warning to Error promotion in ext/standard

Those should be the last ones other than set(raw)cookie()

Closes GH-5814


# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...


# 62dce979 27-Aug-2020 Nikita Popov

Require non-negative length in stream_get_contents()

If the length is not -1, require it to be non-negative.

Using such lengths doesn't make sense (as only -1 is special-case
to

Require non-negative length in stream_get_contents()

If the length is not -1, require it to be non-negative.

Using such lengths doesn't make sense (as only -1 is special-case
to read in chunks, anything else will end up doing a huge upfront
allocation) and can lead to string allocation overflow.

A similar check is already in place for file_get_contents(). That
one does not allow -1 (and uses null instead), but this function
is explicitly specified to accept -1, so stick to that behavior.

show more ...


Revision tags: php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1
# ae755427 16-Jul-2020 Christoph M. Becker

Fix #79805: sapi_windows_vt100_support throws TypeError

It does not make sense to throw a `TypeError` when the stream can't be
analyzed. If `sapi_windows_vt100_support()` is used as get

Fix #79805: sapi_windows_vt100_support throws TypeError

It does not make sense to throw a `TypeError` when the stream can't be
analyzed. If `sapi_windows_vt100_support()` is used as getter, we just
return `false` in that case; if the function is used as setter, we
additionally trigger a warning.

We also fix the test cases for this function, which have been broken
before. Note that these tests are still whitespace sensitive.

show more ...


Revision tags: php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20
# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758


# 0280b83e 06-Jul-2020 Nikita Popov

Avoid some unnecessary uses of no_separation=0

For the rare cases where references are part of the API,
construct them explicitly. Otherwise do not allow separation.


Revision tags: php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1
# 6111d64c 16-Apr-2020 Máté Kocsis

Improve a last couple of argument error messages

Closes GH-5404


Revision tags: php-7.2.30
# b56fb901 14-Apr-2020 Nikita Popov

Don't leak peername if accept fails

Even if the accept fails, the peername may be populated.


Revision tags: php-7.4.5, php-7.3.17
# b3f3a80f 09-Apr-2020 Nikita Popov

Make stream_socket_enable_crypto() session stream nullable


# 217dfc08 09-Apr-2020 Nikita Popov

Accept null context in stream_socket_(client|server)


Revision tags: php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1
# bb6f3740 24-Feb-2020 Máté Kocsis

Improve argument error messages in ext/standard

Closes GH-5198


# 53797c20 11-Mar-2020 Christoph M. Becker

Fix #78210: Invalid pointer address

This is actually about three distinct issues:

* If an empty string is passed as $address to `stream_socket_sendto()`,
the `sa` is not initi

Fix #78210: Invalid pointer address

This is actually about three distinct issues:

* If an empty string is passed as $address to `stream_socket_sendto()`,
the `sa` is not initialized, so we must not pass it as `addr` to
`php_stream_xport_sendto()`.

* On POSIX, `recvfrom()` truncates messages which are too long to fit
into the specified buffer (unless `MSG_PEEK` is given), discards the
excessive bytes, and returns the buffer length. On Windows, the same
happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code
`WSAEMSGSIZE`. We have to catch this for best POSIX compatibility.

* In `php_network_parse_network_address_with_port()`, we have to zero
`in6` (not only its alias `sa`) to properly support IPv6.

Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>

show more ...


Revision tags: php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14
# d1764ca3 15-Jan-2020 Máté Kocsis

Make error messages more consistent by fixing capitalization

Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.


Revision tags: php-7.3.14RC1, php-7.4.2RC1
# aadd3aae 03-Jan-2020 Máté Kocsis

Use RETURN_THROWS() in various places


12345678910>>...13