Commit Graph

65158 Commits

Author SHA1 Message Date
Derick Rethans
9f3e120dc0 Updated to version 2023.4 (2023d) 2024-01-02 10:21:28 +00:00
Niels Dossche
b131681d4c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Skip on Windows
2024-01-01 15:58:52 +01:00
Niels Dossche
0d2c83ef9c Skip on Windows 2024-01-01 15:58:47 +01:00
Niels Dossche
8d095af1c0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test not emitting warning because of Windows paths
2024-01-01 15:27:43 +01:00
Niels Dossche
7677df4cf1 Fix test not emitting warning because of Windows paths 2024-01-01 15:27:33 +01:00
Niels Dossche
e5e2190d45 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test on Windows
2024-01-01 14:56:58 +01:00
Niels Dossche
c86f05307e Fix test on Windows 2024-01-01 14:56:49 +01:00
Niels Dossche
e787790cfc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix #77432: Segmentation fault on including phar file
2024-01-01 13:46:27 +01:00
Niels Dossche
1edcfccdca Fix #77432: Segmentation fault on including phar file
phar_get_pharfp() can return NULL. In this case this is because the
stream gets closed by the include code in the engine. However, the phar
entry is still cached, so when the next include happens the engine tries
to read from a closed (and nullified) stream.
Use the same fix as in phar_open_entry_fp(): take into account that the
phar_get_pharfp() can return NULL and in that case reopen the phar
archive.

Closes GH-13056.
2024-01-01 13:45:40 +01:00
Niels Dossche
42575ac966 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12974: Apache crashes on shutdown when using pg_pconnect()
2023-12-27 20:16:32 +01:00
Niels Dossche
77ac1e8592 Fix GH-12974: Apache crashes on shutdown when using pg_pconnect()
On ZTS, the global variables are stored in dynamically allocated memory.
When the module gets shut down this memory is released. After the module
is shut down, only then are the persistent resources cleared. Normally
this isn't an issue, but pgsql and odbc refer to the globals to modify
some counters, after the globals have been freed.
Fix this by guarding the modification.

Closes GH-13032.
2023-12-27 20:14:23 +01:00
Niels Dossche
93951cf5ab Fix GH-13012: DOMNode::isEqualNode() is incorrect when attribute order is different
Attributes (and namespace declarations) have to be compared in an
unordered way.

Closes GH-13017.
2023-12-27 02:22:23 +01:00
Dmitry Stogov
fd58f61a22 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix assertion
2023-12-25 13:22:39 +03:00
Dmitry Stogov
5350952a37 Fix assertion
Fixes oss-fuzz #65233
2023-12-25 13:22:03 +03:00
David Carlier
0c8e45e71f Merge branch 'PHP-8.2' into PHP-8.3 2023-12-23 17:15:06 +00:00
David Carlier
d98a45d08c ext/pgsql: pgsql.allow_persistent, no need to use such large type for boolean state.
also ext/odbc, simplifying odd comparison with non persistent connections.

Close GH-12976
2023-12-23 17:14:48 +00:00
Niels Dossche
5f69232b53 Revert "Fix crashes with entity references and predefined entities"
This reverts commit 3fa5af8496.
2023-12-23 17:31:18 +01:00
Niels Dossche
bb007438e2 Fix libxml2 build for 2.12.0-2.12.2 2023-12-23 17:20:52 +01:00
Niels Dossche
3fa5af8496 Fix crashes with entity references and predefined entities
There's two issues here:
- freeing of predefined entity declaration crashes (unique to 8.3 & master)
- using multiple entity references for a single entity declaration crashes
  (since forever)

The fix for the last issue is fairly easy to do on 8.3, but may require a
slightly different approach on 8.2. Therefore, for now this is 8.3-only.

Closes GH-13004.
2023-12-23 17:00:57 +01:00
Niels Dossche
8e8d5ce240 Fix crash in adoptNode with attribute references
I forgot to also update the document reference of attributes, so when
there is no document reference anymore from a variable, but still an
attribute, this can crash. Fix it by also updating the document
references for attributes.

Closes GH-13002.
2023-12-23 16:58:11 +01:00
Niels Dossche
b2d778c36e Fix crash when toggleAttribute() is used without a document 2023-12-22 21:12:59 +01:00
David Carlier
f20edf0fb3 Merge branch 'PHP-8.2' into PHP-8.3 2023-12-22 17:26:20 +00:00
David Carlier
6a447e7437 GH-12943 ext/intl accept C as acceptable locale argument.
Close GH-12955
2023-12-22 17:26:09 +00:00
Niels Dossche
b1206ea965 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12980: tidynode.props.attribute is missing "Boolean Attributes" and empty attributes
2023-12-22 17:38:15 +01:00
Niels Dossche
b3f483db2e Fix GH-12980: tidynode.props.attribute is missing "Boolean Attributes" and empty attributes
Closes GH-12993.
2023-12-22 17:37:34 +01:00
Niels Dossche
c3f6579f93 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
2023-12-22 15:07:10 +01:00
SakiTakamachi
b333164423 Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
Partial backport of GH-12793.

Closes GH-12970.
2023-12-22 15:06:01 +01:00
Jakub Zelenka
3c176d4189
Merge branch 'PHP-8.2' into PHP-8.3 2023-12-21 16:43:16 +00:00
Jakub Zelenka
7c4763ab8b
Fix GH-12987: openssl_csr_sign might leak new cert on error
Closes GH-12988
2023-12-21 16:42:09 +00:00
Alex Dowad
e814197371 Fix bug in mb_get_substr_slow (sometimes outputs wrong number of characters)
Thanks to Maurício Fauth for finding and reporting this bug.

The bug was introduced in October 2022. It originally only affected
text encodings which do not have a fixed byte width per characters
and for which mbstring does not have an mblen_table. However, I recently
made another change to mbstring, such that mb_substr no longer relies
on the mblen_table even if one is available. Because of this change,
the bug earlier introduced in October 2022 now affected a greater
number of text encodings, including UTF-8.
2023-12-20 14:32:53 +02:00
Niels Dossche
87c906c33a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12905: FFI::new interacts badly with observers
2023-12-19 15:59:35 +01:00
Niels Dossche
c727f29942 Fix GH-12905: FFI::new interacts badly with observers
Because these functions are copied and not properly registered (which we
can't), the observer code doesn't add the temporaries on startup.
Add them via a callback during startup.

Closes GH-12906.
2023-12-19 15:59:01 +01:00
Dmitry Stogov
555e8f82e8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed type inference
2023-12-18 12:28:25 +03:00
Dmitry Stogov
731734dacb Fixed type inference
Fixes oss-fuzz #65150
2023-12-18 12:27:35 +03:00
Dmitry Stogov
b46ee531bd Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed incorrect elimination of refcounted check in JIT for BIND_GLOBAL
2023-12-18 11:29:17 +03:00
Dmitry Stogov
c67f6f449c Fixed incorrect elimination of refcounted check in JIT for BIND_GLOBAL
Fixes oss-fuzz #65135
2023-12-18 11:27:55 +03:00
Gina Peter Banyard
dcef7039e8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  add PDO::ATTR_AUTOCOMMIT to getAttribute
  Fix GH-12767: Fixed to be able to change autocommit mode using setAttribute
2023-12-18 00:27:58 +00:00
SakiTakamachi
2553ffeaa0
add PDO::ATTR_AUTOCOMMIT to getAttribute
Signed-off-by: Gina Peter Banyard <girgias@php.net>
2023-12-18 00:26:32 +00:00
SakiTakamachi
933dccb79b
Fix GH-12767: Fixed to be able to change autocommit mode using setAttribute
Signed-off-by: Gina Peter Banyard <girgias@php.net>
2023-12-18 00:26:32 +00:00
Niels Dossche
f75931ad9e Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault
Move SimpleXML invalidation code after node checks

This is safe, i.e. the tree hasn't been modified yet, because either we
didn't call a libxml modification function yet, or xmlNewChild is called
with a NULL pointer, which makes it bail out and return NULL.

Closes GH-12947.
2023-12-17 11:51:42 +01:00
Niels Dossche
4fc336c784 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash
  Fix GH-12962: Double free of init_file in phpdbg_prompt.c
2023-12-17 11:50:42 +01:00
Niels Dossche
abf4c116b1 Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash
Closes GH-12945.
2023-12-17 11:47:11 +01:00
Jakub Zelenka
1b8be9acf0
Merge branch 'PHP-8.2' into PHP-8.3 2023-12-15 14:13:41 +00:00
Jakub Zelenka
40ccc8ea7e
Fix GH-9698: stream_wrapper_register crashes with FFI\CData provided as class
Closes GH-12926
2023-12-15 14:11:56 +00:00
Niels Dossche
4269f046c2 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix 32-bit ext/hash build
2023-12-13 19:33:20 +01:00
Niels Dossche
2ee4d358dc Fix 32-bit ext/hash build 2023-12-13 19:33:09 +01:00
Ilija Tovilo
aa52c29f28
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix clean for higher branches
2023-12-13 15:22:09 +01:00
Ilija Tovilo
23ea89404b
Fix clean for higher branches 2023-12-13 15:21:19 +01:00
Ilija Tovilo
cb38d7b23f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disambiguate fileVar8 test folder
2023-12-13 14:31:56 +01:00
Ilija Tovilo
cda7718f51
Disambiguate fileVar8 test folder
Closes GH-12951
2023-12-13 14:31:40 +01:00