1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

13880 Commits

Author SHA1 Message Date
Nicolas Grekas dd9f47758e Declare Transliterator::$id as readonly to unlock subclassing it
Closes GH-9167.
2022-08-01 10:46:57 +02:00
Ilija Tovilo f957e3e7f1 Fix arrow function with never return type
Fixes GH-7900
Closes GH-9103
2022-07-29 12:25:09 +02:00
Derick Rethans a50499bbaf Merge branch 'PHP-8.1' 2022-07-28 15:15:15 +01:00
Derick Rethans a0c01f385c Add test case for GH-9601: DateInterval 1.5s added to DateTimeInterface is rounded down since PHP 8.1.0 2022-07-28 11:55:35 +01:00
Jakub Zelenka 1a9e6895f1 Fix #65069: GlobIterator incorrect handling of open_basedir check
This PR changes the glob stream wrapper so it impacts "glob://"
streamsas well. The idea is to do a check for each found path instead
of the pattern which was not working correctly.
2022-07-28 11:42:42 +01:00
jcm 520bb2ec6c Fix get/set priority - error handling for MacOS and extra tests
Closes GH-9044.
2022-07-27 13:53:42 +02:00
Christoph M. Becker ca84d06bbc Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9032: SQLite3 authorizer crashes on NULL values
2022-07-27 13:06:15 +02:00
Christoph M. Becker 8ed21a89f3 Fix GH-9032: SQLite3 authorizer crashes on NULL values
The arguments 3 to 6 of the authorizer callback may be `NULL`[1], and
we have to properly deal with that.  Instead of causing a segfault, we
deny authorization, which is still better than a crash, and apparently,
we cannot do better anyway.

[1] <https://www.sqlite.org/c3ref/set_authorizer.html>

Closes GH-9040.
2022-07-27 12:49:16 +02:00
Christoph M. Becker cf1664e91d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9155: dba_open("non-existing", "c-", "flatfile") segfaults
2022-07-27 12:13:32 +02:00
Christoph M. Becker a442e29485 Fix GH-9155: dba_open("non-existing", "c-", "flatfile") segfaults
We must not assume that the lock file has been opened.

Closes GH-9156.
2022-07-27 12:08:36 +02:00
Adam Saponara 8cf9c2f200 Fix GH-9090: Support assigning function pointers in FFI
Closes GH-9107.
2022-07-27 10:42:25 +02:00
Tim Düsterhus d058acb4ac Use ValueError if an invalid mode is passed to Mt19937 (#9159) 2022-07-27 09:03:02 +02:00
Christoph M. Becker 5d52d472ef Fix #69181: READ_CSV|DROP_NEW_LINE drops newlines within fields
One may argue that `DROP_NEW_LINE` does not make sense in combination
with `READ_CSV`, but without `DROP_NEW_LINE`, `SKIP_EMPTY` does not
skip empty lines at all.  We could fix that, but do not for BC reasons.
Instead we no longer drop newlines in `spl_filesystem_file_read_ex()`
when reading CSV, but handle that in `spl_filesystem_file_read_csv()`
by treating lines with only (CR)LF as being empty as well.

Closes GH-7618.
2022-07-26 18:33:57 +02:00
David Carlier 9090e2602e sockets ext for solaris update.
socket filter support, system can support up to 32 filters giving the possibility to retrive the full list.
Closes #8191.
2022-07-25 19:28:25 +01:00
Christoph M. Becker 4834cfea1a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9033: Loading blacklist file can fail due to negative length
2022-07-25 16:32:18 +02:00
Christoph M. Becker 35fd97c3c9 Fix GH-9033: Loading blacklist file can fail due to negative length
If the blacklist file contains a line with a single double-quote, we
called `zend_strndup(pbuf, -1)` what causes an unnecessary bail out;
instead we just ignore that line.

If the blacklist file contains an empty line, we may have caused an OOB
read; instead we just ignore that line.

Closes GH-9036.
2022-07-25 16:30:19 +02:00
Martin Herndl 229b189293 [ci skip] Fix str_split NEWS and UPGRADE note
Closes GH-9123.
2022-07-25 13:45:01 +02:00
Go Kudo 34b352d121 Fix memory leak on Randomizer::__construct() call twice (#9091)
When Radomizer::__construct() was called with no arguments, Randomizer\Engine\Secure was implicitly instantiate and memory was leaking.
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2022-07-24 03:09:14 +09:00
George Peter Banyard 3c372901bd Add support to pass driver flags to DBA handlers
Currently only LMDB with DBA_LMDB_USE_SUB_DIR/DBA_LMDB_NO_SUB_DIR are supported
2022-07-23 18:38:27 +01:00
Tim Düsterhus eff9aed159 [ci skip] Update NEWS for byte expansion in rand_rangeXX()
see GH-9083
see GH-9088
see GH-9056
2022-07-22 18:52:47 +02:00
Derick Rethans 1d0e5eddd5 Add test case for bug #80483/#75035 2022-07-22 15:34:57 +01:00
Derick Rethans b1575f996c Merge branch 'PHP-8.1' 2022-07-22 13:08:11 +01:00
Derick Rethans 7831a1cae6 Add test case for GH-8964 2022-07-22 13:06:32 +01:00
Tim Düsterhus c5f9b2f292 [ci skip] Fix version of NEWS entry
see 133b9b08da
2022-07-22 09:06:12 +02:00
Go Kudo 133b9b08da Avoid signed integer overflow in php_random_range() (#9066) 2022-07-22 10:57:32 +09:00
Tim Düsterhus dfbe96489d [ci skip] Add "segmentation fault if user engine throws" to NEWS
see GH-9055
2022-07-21 19:32:01 +02:00
George Peter Banyard f60f6be66b Update NEWS 2022-07-21 14:10:31 +01:00
George Peter Banyard 6cdfaf97e0 Update NEWS 2022-07-21 14:09:27 +01:00
George Peter Banyard 5b83b3a933 Fix memory leak in LMDB driver 2022-07-21 14:05:48 +01:00
Derick Rethans 1c8e566fb5 Update NEWS 2022-07-21 12:35:13 +01:00
Derick Rethans 3edf93d7ee Update NEWS 2022-07-21 12:34:45 +01:00
Christoph M. Becker 8487d8fa91 Fix GH-9067: random extension is not thread safe
For thread-safety, we need to initialize global variables in GINIT (or
RINIT), but not in MINIT.

Closes GH-9070.
2022-07-21 12:53:07 +02:00
Christoph M. Becker c2bdaa48e1 Fix GH-9008: mb_detect_encoding(): wrong results with null $encodings
Passing `null` to `$encodings` is supposed to behave like passing the
result of `mb_detect_order()`.  Therefore, we need to remove the non-
encodings from the `elist` in this case as well.  Thus, we duplicate
the global `elist`, so we can modify it.

Closes GH-9063.
2022-07-20 16:58:55 +02:00
Christoph M. Becker d430652935 Fix --CGI-- support of run-tests.php
The `--CGI--` section is supposed to be just a marker, and to be empty
as such.  However, a previous refactoring[1] broke that.

[1] <https://github.com/php/php-src/commit/9140c9038a83ff55a78f357f8485de086d83d94e>

Closes GH-9061.
2022-07-20 14:41:28 +02:00
David CARLIER 1977ef92de opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #8908.
2022-07-20 09:15:37 +01:00
Patrick Allaert 9af3327176 PHP-8.1 is now for PHP 8.1.10-dev 2022-07-20 06:48:52 +02:00
Pierrick Charron 8225e419e0 [ci skip] Update NEWS for PHP 8.2.0 beta2 2022-07-19 12:26:43 -04:00
Christoph M. Becker 32d55f7422 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9017: php_stream_sock_open_from_socket could return NULL
2022-07-19 17:07:27 +02:00
Heiko Weber 3b7babf9b3 Fix GH-9017: php_stream_sock_open_from_socket could return NULL
Closes GH-9020.
2022-07-19 17:06:02 +02:00
Tim Düsterhus 7ae7df5b46 RFC: Make the iterator_*() family accept all iterables (#8819)
https://wiki.php.net/rfc/iterator_xyz_accept_array
2022-07-19 16:46:32 +02:00
David CARLIER 1416961505 opcache JIT support improvements attempts on macOs.
for cases when shared segments switch b/w R/W/X and R/X bits.

Closes #8382.
2022-07-19 13:41:33 +01:00
dixyes 745cf34ffc Port standard/crc32 for windows arm64
We also add arm64 support for php_get_windows_cpu().

Closes GH-7703.
2022-07-19 13:23:44 +02:00
Go Kudo 4d8dd8d258 Implement Random Extension
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
Gabriel Caruso a670d2be74 Prepare for PHP 8.0.23 2022-07-19 10:31:08 +02:00
Eric Norris 09237f6126 Update request startup error messages 2022-07-18 23:19:59 +01:00
root d8fc05c05e Add FILTER_FLAG_GLOBAL_RANGE to filter Global IPs as per RFC 6890 2022-07-18 17:56:05 +01:00
Mikhail Galanin ffdf25a270 Add "error_log_mode" setting 2022-07-18 15:41:28 +01:00
David CARLIER 9a8ae45c4b Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:54 +01:00
David CARLIER 2a5b2cca85 Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:07 +01:00
David Carlier d0962859f4 Merge branch 'PHP-8.1' 2022-07-18 12:41:24 +01:00