1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

62553 Commits

Author SHA1 Message Date
David CARLIER 8e2d4e6b52 random left rotates annotating as const. (#9346) 2022-08-16 05:31:58 +01:00
David Carlier db64c1cb70 zend introduce const GNUC attribute. sub optimisation where there is no pointers, nor particular memory layout, thread local/volatile ... involved. usage concealed for now into little pack helpers.
Closes #9326.
2022-08-15 19:49:24 +01:00
Christoph M. Becker ac9cbb7174 Merge branch 'PHP-8.1'
* PHP-8.1:
  Correct IntlDateFormatter::formatObject params
2022-08-15 18:10:54 +02:00
Christoph M. Becker 306da80f56 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Correct IntlDateFormatter::formatObject params
2022-08-15 17:58:52 +02:00
Gert de Pagter 05ed47ef12 Correct IntlDateFormatter::formatObject params
Closes GH-9341.
2022-08-15 17:56:34 +02:00
Tim Düsterhus 3b48a2044d Replace RuntimeException in Randomizer::nextInt() by RandomException (#9305)
* Replace RuntimeException in Randomizer::nextInt() by RandomException

* Add ext/random/tests/03_randomizer/nextint_error.phpt
2022-08-15 11:06:03 +02:00
twosee ef39adb638 Merge branch 'PHP-8.1'
* PHP-8.1:
  Re-fix GH-8409: SSL handshake timeout persistent connections hanging
  Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"
2022-08-14 20:15:35 +08:00
twosee 14d71957ca Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-fix GH-8409: SSL handshake timeout persistent connections hanging
2022-08-14 20:14:57 +08:00
twosee b8d07451d4 Re-fix GH-8409: SSL handshake timeout persistent connections hanging
This fix is another solution to replace d0527427be, use zend_try and zend_catch to make sure persistent stream will be released when error occurred.

Closes GH-9332.
2022-08-14 20:13:36 +08:00
Jakub Zelenka 897ca85d33 Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"
This reverts commit d0527427be.

This patch makes Swoole/Swow can not work anymore, because Coroutine will yield to another one during socket operation, EG(record_errors) assertion will always fail, and zend_begin_record_errors() was only used during compile time before.
Note: zend_emit_recorded_errors() and the typo fix are reserved.
2022-08-14 19:41:06 +08:00
Tim Düsterhus b825756317 Update expires format for session cookie (#9304)
* Update expires format for session cookie

see GH-9200
see 15e3fcb468

* Add ext/session/tests/gh9200.phpt
2022-08-12 19:52:04 +02:00
Jakub Zelenka 438f692e92 Merge branch 'PHP-8.1' 2022-08-12 17:12:28 +01:00
Jakub Zelenka d0527427be Fix GH-8409: SSL handshake timeout persistent connections hanging
This is not actually related to SSL handshake but stream socket creation
which does not clean errors if the error handler is set. This fix
prevents emitting errors until the stream is freed.
2022-08-12 17:09:24 +01:00
Christoph M. Becker e885831670 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-9309: Segfault when connection is used after imap_close()
2022-08-12 16:25:46 +02:00
Christoph M. Becker 71c22efae7 Fix GH-9309: Segfault when connection is used after imap_close()
We actually need to check whether `php_imap_object.imap_stream` is
`NULL` to detect that the connection has already been closed.

Closes GH-9313.
2022-08-12 16:24:30 +02:00
Ilija Tovilo 98bdb7f99b Make pestr[n]dup infallible (#9295)
Fixes GH-9128
Closes GH-9295
2022-08-12 12:21:14 +02:00
Christoph M. Becker 1094a859ad Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-9296: `ksort` behaves incorrectly on arrays with mixed keys
2022-08-12 11:38:21 +02:00
Christoph M. Becker 7908aae30c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9296: `ksort` behaves incorrectly on arrays with mixed keys
2022-08-12 11:36:24 +02:00
Denis Vaksman cd1aed8edd Fix GH-9296: ksort behaves incorrectly on arrays with mixed keys
The comparator function used at ksort in SORT_REGULAR mode
need to be consistent with basic comparison rules. These rules
were changed in PHP-8.0 for numeric strings, but comparator
used at ksort kept the old behaviour. It leads to inconsistent
situations, when after ksort the first key is GREATER than some
of the next ones by according to the basic comparison operators.

Closes GH-9293.
2022-08-12 11:32:23 +02:00
Derick Rethans a6a5d46704 Simplify and move check for too high expiry time, which you can't reach on 32bit systems 2022-08-11 16:27:25 +01:00
Derick Rethans 15e3fcb468 Fixed GH-9200: setcookie has an obsolete expires date format 2022-08-11 16:27:25 +01:00
Derick Rethans 9dc6ee995f Merge branch 'PHP-8.1' 2022-08-11 16:26:46 +01:00
Derick Rethans 3509ca3d65 Merge branch 'PHP-8.0' into PHP-8.1 2022-08-11 16:26:40 +01:00
Derick Rethans 962d8bd0b6 The data for Tehran has changed, update test 2022-08-11 16:26:33 +01:00
Derick Rethans 2fbea217c2 Updated to version 2022.2 (2022b) 2022-08-11 15:54:31 +01:00
Derick Rethans 455c40da50 Updated to version 2022.2 (2022b) 2022-08-11 15:54:30 +01:00
Derick Rethans c6992121cc Updated to version 2022.2 (2022b) 2022-08-11 15:54:28 +01:00
Dmitry Stogov 04d5faed23 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix order of checks to throw exception with better message
2022-08-11 09:32:18 +03:00
Dmitry Stogov 18183ff9c7 Fix order of checks to throw exception with better message
This clarifies the "->cdata" meaning.
2022-08-11 09:30:47 +03:00
jcm 663b037c7b QA - pcntl - adjust tests set/get priority check env vars and root user 2022-08-09 21:16:21 +01:00
dixyes 279a297172 Windows arm64 build system support
Closes GH-9116.
2022-08-09 16:22:14 +02:00
dixyes 3a843f953b Windows arm64 zend and standard extension support
* Port zend_cpuid for windows arm64
* Fix zend_atomic windows arm64 build
* Fix windows arm64 multiply
* Enable arm64 neon for windows in standard extension
* Enable arm64 neon for windows in zend_hash.c
* Workaround for msvc arm64 optimization bug

Closes GH-9115.
2022-08-09 12:45:14 +02:00
Máté Kocsis aeabb51ae4 Declare ext/intl constants in stubs - part 9 (#9276) 2022-08-09 11:32:06 +02:00
Máté Kocsis 08748577c0 Declare ext/intl constants in stubs - part 8 (#9275) 2022-08-09 11:29:26 +02:00
Máté Kocsis 383eefa9e4 Declare ext/intl constants in stubs - part 11 (#9281) 2022-08-09 11:28:18 +02:00
Máté Kocsis bc4c11ab14 Declare ext/intl constants in stubs - part 12 (#9282) 2022-08-09 11:27:41 +02:00
Máté Kocsis 559d5030a8 Declare ext/intl constants in stubs - part 10 (#9280) 2022-08-09 11:19:23 +02:00
Christoph M. Becker d013d94985 Fix GH-9248: Segmentation fault in mb_strimwidth()
We need to initialize the optional argument `trimmarker` with its
default value.

Closes GH-9273.
2022-08-08 18:35:37 +02:00
Máté Kocsis 8fee9a3f11 Declare ext/intl constants in stubs - part 7 (#9269) 2022-08-08 14:24:22 +02:00
Máté Kocsis d97f8eef33 Declare ext/intl constants in stubs - part 6 (#9268) 2022-08-08 14:21:48 +02:00
Máté Kocsis 614e9ec804 Declare ext/intl constants in stubs - part 5 (#9267) 2022-08-08 12:00:10 +02:00
Máté Kocsis c1da9e7964 Declare ext/intl constants in stubs - part 4 (#9234) 2022-08-08 08:56:51 +02:00
Máté Kocsis 163a278a02 Declare ext/intl constants in stubs - part 3 (#9233) 2022-08-08 08:28:40 +02:00
Jakub Zelenka 80197c59ec Merge branch 'PHP-8.1' 2022-08-07 14:22:33 +01:00
Jakub Zelenka c9fa98a174 Merge branch 'PHP-8.0' into PHP-8.1 2022-08-07 14:21:39 +01:00
Jakub Zelenka d9ff5e079f Fix GH-8472: stream_socket_accept result may have incorrect metadata 2022-08-07 14:17:38 +01:00
Christoph M. Becker ad04345eb3 Fix GH-9244: Segfault with array_multisort + array_shift
After restructuring non-packed arrays, we either need to pack them if
possible, or to rehash them.

Closes GH-9247.
2022-08-05 17:09:54 +02:00
Ilija Tovilo a6f489b452 Fix mb_strimwidth RC info
Closes GH-9254
2022-08-05 17:06:23 +02:00
Tim Düsterhus 1cd2d731ef Handle all-zero state in Xoshiro256** (#9250)
- Retry if the CSPRNG generates a zero state.
- Throw ValueError if the user passes a zero state.

Fixes GH-9249
2022-08-05 14:38:57 +02:00
Tim Düsterhus a191710a21 [ci skip] Run dos2unix on ext/random tests
One test inconsistently had CRLF newlines.
2022-08-04 21:01:04 +02:00