Strings loaded from the file cache can not have a CE cache, because their cache
slot is invalid. Remove the IS_STR_CLASS_NAME_MAP_PTR flag from these strings.
We can also avoid updating the str flags in SERIALIZE_STR(), since the same
updates must also be done in UNSERIALIZE_STR().
This was already done for interned strings, but not for non-interned ones.
Fixes GH-20329
Closes GH-20337
Either the buffer size or the return value needs to be checked.
From a quick look into the tidy source code, this can't fail right now
for our use case in practice, but it might in the future.
Closes GH-20389.
> LeakSanitizer has encountered a fatal error.
This happens only on 8.2/8.3 for some reason. Don't merge for 8.4 for now, we
can do that later if it reoccurs.
These tests:
- ext/standard/tests/network/udp4loop.phpt
- ext/sockets/tests/socket_create_listen.phpt
- ext/sockets/tests/socket_create_listen-win32.phpt
all use port 31338. socket_create_listen.phpt and its win32 variant are mutually
exclusive, so they can't conflict. While udp4loop.phpt tries multiple ports, the
other tests do not. If udp4loop.phpt runs first and socket_create_listen.phpt
starts before it ends, the port is still blocked. Bump the start port for
udp4loop.phpt to avoid conflicts.
Both enums and integers map to TidyInteger, however, in the TidyInteger
case we always used zval_get_long(). So for a non-numeric string, this
would get turned into 0. 0 is the first enum value in that case, so the
wrong enum value could be selected.
To solve this, add special handling for strings and (stringable) objects
such that we can explicitly check for numeric strings, and if they're
not, handle them as normal strings instead of as 0.
Closes GH-20387.
Looking at the strace, the timeout is only 1s which may be too low
anyway for checking for a response, but some servers also don't end up
replying finally anyway and close the connection already.
`data_available` was originally used for non-blocking downloads/uploads
and then reused for the shutdown sequence, but its error handling was
never adjusted to be silent.
Closes GH-20294.
* ftp: Fix weird typo
In 8827f8eca9 the async functions were
renamed to nb functions. So this was just a find+replace of async to nb.
The diff shows that "no asyncronous transfer to continue" was replaced
with "no nbronous transfer to continue". Makes no sense.
* Update ext/ftp/php_ftp.c
Co-authored-by: Jakub Zelenka <bukka@php.net>
---------
Co-authored-by: Jakub Zelenka <bukka@php.net>
We should not free `intern` as its stored in the object store as well,
so the object store will already free it, leading to a UAF when the
object store tries to read the object's fields.
Closes GH-20276.
The FIELD_TYPE constants are for BC. The JSON/VECTOR types are not
defined in FIELD_TYPE for libmysqlclient.
MYSQL_TYPE is available since MYSQL 5.0.0, so switch to that.
Since MYSQL_TYPEs are enums and not defines, we need version checks
instead.
JSON was added in mysql 8.0.0 in mysql/mysql-server@c240455145
JSON support was backported via mysql/mysql-server@3e14f9f in 5.7.8.
VECTOR was added in mysql 9.0.0 in mysql/mysql-server@8cd51511de
Replaces GH-20245.
This fixes incorrect type conversion and subsequent check for Windows
where returned socket is not an int.
It should be noted that this is not really an issue as previous int
would get negative so the check should still work. The issue actually
happens only in master (PHP 8.5) where refactoring has been done and the
type changed.
Closes GH-19881
jobs_url is a link to the api, rather than the website.
Also tweak wording, as we now only send one notification per workflow, rather
than per failed job.