History log of /PHP-8.1/ (Results 101 – 125 of 105955)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
92693a2210-Oct-2023 Ilija Tovilo

Move Cirrus to nightly only, trigger on-demand

Closes GH-12398

2297e8c109-Oct-2023 Dmitry Stogov

Fixed possible use-after-free

24e5e4ec08-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-8996: DOMNode serialization on PHP ^8.1

PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by
blocking the (un)serialization of DOM objects.
This was done bec

Fix GH-8996: DOMNode serialization on PHP ^8.1

PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by
blocking the (un)serialization of DOM objects.
This was done because the serialization never really worked and just
resulted in an empty object, which upon unserialization just resulted in
an object that you can't use.

Users can however implement their own serialization methods, but the
commit made that impossible as the ACC flag gets passed down to the
child class. An approach was tried in #10307 with a new ACC flag to
selectively allow serialization with subclasses if they implement the
right methods. However, that was found to be too ad hoc.

Instead, let's abuse how the __sleep and __wakeup methods work to throw
the exception instead. If the child class implements the __serialize /
__unserialize method, then the throwing methods won't be called.
Similarly, if the child class implements __sleep and __wakeup, then
they're overridden and it doesn't matter that they throw.

For the user, this PR has the exact same behaviour for (sub)classes that
don't implement the serialization methods: an exception will be thrown.
For code that previously implemented subclasses with these methods, this
approach will make that code work again. This approach should be both BC
preserving and unbreak user's code.

Closes GH-12388.

For the test:
Co-authored-by: wazelin <contact@sergeimikhailov.com>

show more ...

fb68387707-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12380: JIT+private array property access inside closure accesses private property in child class

For private fields, the scope has to be taken into account, otherwise
the property

Fix GH-12380: JIT+private array property access inside closure accesses private property in child class

For private fields, the scope has to be taken into account, otherwise
the property info may come from the wrong ce.

Closes GH-12381.

show more ...

36b2c5dc09-Oct-2023 Dmitry Stogov

Fix GH-12364: JIT leak in Symfony TranslationDebugCommandTest (#12394)

44a7016009-Oct-2023 Dmitry Stogov

Fix incorrect trace type inference

Fixes GH-12365

5a8f96b009-Oct-2023 Dmitry Stogov

Fixed GH-12382: JIT Index invalid or out of range error

6bb536e307-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

[ci skip] Add xml and simplexml dependency to EXTENSIONS section in test

ae52f19507-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix Windows CI

The path to mysql.exe changed. Fortunately, chocolately puts the folder
containing the exe in the PATH environment variable, so we don't even
need to provide an absolu

Fix Windows CI

The path to mysql.exe changed. Fortunately, chocolately puts the folder
containing the exe in the PATH environment variable, so we don't even
need to provide an absolute path.

show more ...

f6ac08c605-Oct-2023 coppolafab

php_cli_server: ensure single date header is present

Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a chec

php_cli_server: ensure single date header is present

Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a check condition before append the header, and a test file.

Closes GH-12363.

show more ...

36a87e6d04-Oct-2023 Ilija Tovilo

Minimal backport of 098d9ca

6e7e52de04-Oct-2023 Ilija Tovilo

Fix SKIPIF jit test

JIT can be available but disabled, in which case the array offset 'jit' is still
available.

cad1660503-Oct-2023 Ilija Tovilo

[skip ci] Test opcache_invalidate() return value for deleted files

f4ab494929-Sep-2023 Mikhail Galanin

Invalidate path even if the file was deleted

Closes GH-12323

54452b4803-Oct-2023 Dmitry Stogov

Fixed GH-12262: Tracing JIT assertion crash when using phpstan

6cf76d5502-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Ignore optional warning output in test

Due to the greedy behaviour of regex, we can't seem to use %A?
Use a for loop with a marker instead to ignore module startup warnings.

b140f6e902-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix test under older CI configurations

bdc87b0f27-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix #80092: ZTS + preload = segfault on shutdown

After preloading has executed, the executor globals for class_table and
function_table are still referring to the values during preloadin

Fix #80092: ZTS + preload = segfault on shutdown

After preloading has executed, the executor globals for class_table and
function_table are still referring to the values during preloading.
If no request happens after that then these values will remain dangling
pointers. If then the -v option on CLI or -h option (and possibly
others) on CGI is provided, there is a double free.
Fix it by nulling the pointers explicitly after preloading has finished
to fix it for all SAPIs.

Closes GH-12311.

show more ...

a1225f3530-Sep-2023 Anatol Belski

NEWS: Added note about #11891

[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>

b842ea4f28-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Apply SimpleXML iterator fixes only on master

Many methods in SimpleXML reset the iterator when called. This has the
consequence that mixing these operations with loops can cause infinit

Apply SimpleXML iterator fixes only on master

Many methods in SimpleXML reset the iterator when called. This has the
consequence that mixing these operations with loops can cause infinite
loops, or the loss of iteration data.
Some people may however rely on the resetting behaviour. To prevent
unintended breaks in stable branches, let's only apply the fix to master.

This reverts GH-12193, GH-12229, GG-12247 for stable branches while
keeping them on master, adding a note in UPGRADING as well.

show more ...

1f5bea3411-Aug-2023 usarise <7043681+usarise@users.noreply.github.com>

fileinfo: Backport svg detection patch

643c4ba429-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Revert "Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT"

Although it passes CI on 8.1, it causes CI failures in the JIT on 8.2 and
higher.
See https:

Revert "Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT"

Although it passes CI on 8.1, it causes CI failures in the JIT on 8.2 and
higher.
See https://github.com/php/php-src/actions/runs/6357716718/job/17269225001

This reverts commit e72fc12058dc0ee7bfe534dfa3daf46f3b357190.

show more ...

e72fc12026-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT

This test triggers narrowing for two ops: first ZEND_ADD_ARRAY_ELEMENT,
and then ZEND_ASSIGN.

Th

Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT

This test triggers narrowing for two ops: first ZEND_ADD_ARRAY_ELEMENT,
and then ZEND_ASSIGN.

The type inference happens in the following order:
1) The ZEND_ADD_ARRAY_ELEMENT infers type 0x40e04080 (packed flag is set),
arr_type=0 at this point because it hasn't been set by ZEND_INIT_ARRAY yet.
2) The ZEND_INIT_ARRAY infers type 0x40804080
3) The ZEND_ADD_ARRAY_ELEMENT infers type 0x40e04080, arr_type=0x40804080,
which does not have the packed flag set while the existing result of
ZEND_ADD_ARRAY_ELEMENT has the packed flag set.

This seems to occur because of the phi node introduced by the while
loop. If I remove the loop the problem goes away.

As Arnaud noted, this seems to be caused by a too wide type inference
for arr_type==0. We should keep the invariant that if x>=y then
key_type(x) >= key_type(y).
If we write the possible results down in a table we get:

```
arr_type resulting key type
--------------- --------------------------------------------------------------------------
HASH_ONLY -> MAY_BE_ARRAY_NUMERIC_HASH
PACKED_ONLY -> MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED (== MAY_BE_ARRAY_KEY_LONG)
HASH || PACKED -> MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED (== MAY_BE_ARRAY_KEY_LONG)
0 -> MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED (== MAY_BE_ARRAY_KEY_LONG)
```

As we can see, `HASH_ONLY > 0` but
`MAY_BE_ARRAY_NUMERIC_HASH < MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED`,
which violates the invariant.
Instead if we modify the zero case to have MAY_BE_ARRAY_NUMERIC_HASH instead,
we get the following table which satisfies the invariant.

```
arr_type resulting key type
--------------- --------------------------------------------------------------------------
HASH_ONLY -> MAY_BE_ARRAY_NUMERIC_HASH
PACKED_ONLY -> MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED (== MAY_BE_ARRAY_KEY_LONG)
HASH || PACKED -> MAY_BE_ARRAY_NUMERIC_HASH | MAY_BE_ARRAY_PACKED (== MAY_BE_ARRAY_KEY_LONG)
0 -> MAY_BE_ARRAY_NUMERIC_HASH
```

Broke in 1ffbb73.
Closes GH-10294.

show more ...

2a7f23e928-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML

The return type is wrong. You can also use this method with SimpleXML.
In fact, PHP provides a way that even t

Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML

The return type is wrong. You can also use this method with SimpleXML.
In fact, PHP provides a way that even third party libraries can hook
into its XML handling. Therefore, we cannot even use the
SimpleXML|DOMDocument|false union type as third party extensions may
extend the possibilities.

Broke in 8.1 in 1b35056a33.

Closes GH-12315.

show more ...

b5da98b927-Sep-2023 twosee

Fix socket_export_stream() with wrong protocol

Closes GH-12310.

12345678910>>...4239