1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

138597 Commits

Author SHA1 Message Date
Ilija Tovilo
085c151481 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Postpone zend_array_sort() in ext-intl
  Use bool for zend_array_sort()
2024-11-04 16:02:31 +01:00
Ilija Tovilo
745684290e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Postpone zend_array_sort() in ext-intl
  Use bool for zend_array_sort()
2024-11-04 16:02:16 +01:00
Ilija Tovilo
845cdbce67 Postpone zend_array_sort() in ext-intl
This function is not ZEND_API yet, so we cannot use it as it won't work for
dynamically linked extensions.
2024-11-04 16:01:00 +01:00
Ilija Tovilo
4b9e59b430 [skip ci] Use bool for zend_array_sort()
zend_bool is removed in higher branches.
2024-11-04 15:59:18 +01:00
Ilija Tovilo
230defc198 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix array going away during sorting
2024-11-04 15:51:24 +01:00
Ilija Tovilo
f033cf75e4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix array going away during sorting
2024-11-04 15:51:03 +01:00
Ilija Tovilo
2bdce61390 Fix array going away during sorting
Fixes GH-16648
Closes GH-16654
2024-11-04 15:50:35 +01:00
Ilija Tovilo
ea39a89a74 [skip ci] Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:04:14 +01:00
Ilija Tovilo
5852c89034 [skip ci] Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:03:58 +01:00
Ilija Tovilo
2985de72db [skip ci] Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:03:47 +01:00
Ilija Tovilo
e72854e8bc [skip ci] Fix nightly workflow dispatch
Closes GH-16662
2024-11-04 15:02:11 +01:00
David Carlier
f5b0a9ad19 Merge branch 'PHP-8.3' into PHP-8.4 2024-11-03 13:40:25 +00:00
David Carlier
b28ded42eb Merge branch 'PHP-8.2' into PHP-8.3 2024-11-03 13:39:41 +00:00
David Carlier
90aac521fd Fix GH-16592 msg_send() crashes when the type does not serialize as expected.
It is assumed that the serialization always had initialised its buffer
zend_string, but in the case of a type not serialising, it is null.

close GH-16599
2024-11-03 13:39:24 +00:00
Niels Dossche
bfd9e0cca3 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16628: FPM logs are getting corrupted with this log statement
  Fix GH-16601: Memory leak in Reflection constructors
2024-11-02 19:38:54 +01:00
Niels Dossche
16cda10650 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16628: FPM logs are getting corrupted with this log statement
  Fix GH-16601: Memory leak in Reflection constructors
2024-11-02 19:37:28 +01:00
Niels Dossche
e643129bbb Fix GH-16628: FPM logs are getting corrupted with this log statement
zlog_buf_prefix() can return a larger length than what actually was
written due to its use of snprintf(). The code in
zlog_stream_prefix_ex() does not take this into account, other callers
do. What ends up happening then is that stream->length is set to the
length as if snprintf() was able to write all bytes, causing
stream->length to become larger than stream->buf.size, causing a
segfault.

In case the buffer was too small we try with a larger buffer up to a
limit of zlog_limit. This makes sure that the stream length will remain
bounded by the buffer size.

This also adds assertions to make the programmer intent clear and catch
this more easily in debug builds.

Closes GH-16680.
2024-11-02 19:36:20 +01:00
Niels Dossche
f0f666ba3f Fix GH-16601: Memory leak in Reflection constructors
Additionally fixes wrong behaviour in ReflectionParameter when you first
have a construction that uses an object and the subsequent doesn't.

Closes GH-16672.
2024-11-02 19:35:20 +01:00
Gina Peter Banyard
9e2367f29f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gmp: Fix segfault when null is encountered on an overloaded operator
  ext/gmp: Add behavioural tests for operator overloading
2024-11-02 17:41:27 +00:00
Gina Peter Banyard
65d42342a1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/gmp: Fix segfault when null is encountered on an overloaded operator
  ext/gmp: Add behavioural tests for operator overloading
2024-11-02 17:40:41 +00:00
Gina Peter Banyard
5253647500 ext/gmp: Fix segfault when null is encountered on an overloaded operator
And various other issues like inconsistent type errors

Closes GH-16015
2024-11-02 17:36:32 +00:00
Gina Peter Banyard
fe02fd5095 ext/gmp: Add behavioural tests for operator overloading 2024-11-02 17:32:43 +00:00
Christoph M. Becker
68d3000902 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-14732: date_sun_info() fails for non-finite values
2024-11-01 23:50:40 +01:00
Christoph M. Becker
8df513336a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14732: date_sun_info() fails for non-finite values
2024-11-01 23:47:21 +01:00
Christoph M. Becker
f9453a889d Fix GH-14732: date_sun_info() fails for non-finite values
`timelib_astro_rise_set_altitude()` is not prepared to deal with non-
finite values (`nan`, `inf` and `-inf`) for `lon` and `lat`; instead
these trigger undefined behavior.  Thus we catch non-finite values
before even calling that timelib function; for `date_sun_info()` we
trigger `ValueError`s; for `date_sunrise()` and `date_sunset()` we
silently return `false`, since these functions will be sunsetted
anyway.

Closes GH-16497.
2024-11-01 23:46:19 +01:00
Christoph M. Becker
3245a65034 Adapt ext/intl tests for ICU 76.1
Regarding the test names, see PR #9800.

Closes GH-16660.
2024-11-01 22:21:23 +01:00
Niels Dossche
7a78ffcbb2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16604: Memory leaks in SPL constructors
2024-11-01 20:43:43 +01:00
Niels Dossche
eaa2b61acb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16604: Memory leaks in SPL constructors
2024-11-01 20:43:28 +01:00
Niels Dossche
886a5287ca Fix GH-16604: Memory leaks in SPL constructors
Closes GH-16673.
2024-11-01 20:42:28 +01:00
Christoph M. Becker
1fa8187c7b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Properly initialize _override executor globals
2024-10-31 23:40:48 +01:00
Christoph M. Becker
3cc43bf0e6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Properly initialize _override executor globals
2024-10-31 23:39:40 +01:00
Christoph M. Becker
ec68d3c608 Properly initialize _override executor globals
These have been introduced a while ago[1], but their initialization has
been overlooked.  Since we cannot rely on TLS variables to be zeroed,
we catch up on this.

[1] <e3ef7bbbb8>

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>

Closes GH-16658.
2024-10-31 23:38:01 +01:00
Christoph M. Becker
331bd9571a Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16450: PDO_ODBC can inject garbage into field values
2024-10-31 16:17:50 +01:00
Christoph M. Becker
03bd17bb48 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16450: PDO_ODBC can inject garbage into field values
2024-10-31 16:16:29 +01:00
Christoph M. Becker
c9eafc1954 Fix GH-16450: PDO_ODBC can inject garbage into field values
A previous bug fix[1] relied on ODBC drivers to properly count down the
`StrLen_or_IndPtr` argument for consecutive calls to `SQLGetData()`.
Apparently, not all drivers handle this correctly, so we cannot assert
they do.  Instead we fall back to the old behavior for drivers which
would violate the assertion.

A test against SQLServer (which we currently use in CI) would not make
sense, since the respective drivers do not exhibit that behavior.
Instead we target the regression test especially to a MS Access
database.

Since there is apparently no way to easily create an MS Access database
programmatically, we commit a minimal empty DB which is used for the
regression test, and could also be used by other test cases.

[1] <bccca0b53aa60a62e2988c750fc73c02d109e642>

Closes GH-16587.
2024-10-31 16:15:17 +01:00
Arnaud Le Blanc
54a40f3bde Add ReflectionProperty::isLazy()
Closes GH-16342
2024-10-31 14:14:20 +01:00
Ilija Tovilo
c9a30c9cc3 [skip ci] Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Properly disable -Werror for libmysqlclient + mysqli
  [skip ci] Revert "Remove -Werror for libmysql test on 8.1 only"
2024-10-31 13:47:55 +01:00
Ilija Tovilo
634eaa2c70 [skip ci] Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Properly disable -Werror for libmysqlclient + mysqli
  [skip ci] Revert "Remove -Werror for libmysql test on 8.1 only"
2024-10-31 13:47:43 +01:00
Ilija Tovilo
e5d63eb4b9 [skip ci] Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Properly disable -Werror for libmysqlclient + mysqli
  [skip ci] Revert "Remove -Werror for libmysql test on 8.1 only"
2024-10-31 13:47:23 +01:00
Ilija Tovilo
6c8a0d0163 [skip ci] Properly disable -Werror for libmysqlclient + mysqli 2024-10-31 13:43:39 +01:00
Ilija Tovilo
8a067cc221 [skip ci] Revert "Remove -Werror for libmysql test on 8.1 only"
This reverts commit 769947648e.

Nightly uses the file from master, so this change made no sense.
2024-10-31 13:40:26 +01:00
Ilija Tovilo
a15ba083f6 [skip ci] Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix nightly job name for 8.1
2024-10-31 13:38:44 +01:00
Ilija Tovilo
98aac9eff6 [skip ci] Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix nightly job name for 8.1
2024-10-31 13:38:32 +01:00
Ilija Tovilo
64fbd52cb4 [skip ci] Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix nightly job name for 8.1
2024-10-31 13:38:06 +01:00
Ilija Tovilo
490acdf5e9 [skip ci] Fix nightly job name for 8.1 2024-10-31 13:37:23 +01:00
Niels Dossche
d5e6dd8f2b Add missing cache invalidation for innerHTML (#16652)
* Add test with wrong output

* Add missing cache invalidation for innerHTML
2024-10-30 22:14:20 +01:00
Niels Dossche
65fbf47472 Fix static analysis warning
The condition is already checked at the start of the function, mark this
code properly as unreachable.
2024-10-30 20:55:50 +01:00
Ilija Tovilo
1b6320b0f5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Move nightly to workflow_call
2024-10-30 16:54:27 +01:00
Ilija Tovilo
4685e3c309 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Move nightly to workflow_call
2024-10-30 16:54:20 +01:00
Ilija Tovilo
9e5024d988 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Move nightly to workflow_call
2024-10-30 16:54:11 +01:00