History log of /PHP-8.2/ext/dom/xpath.c (Results 1 – 25 of 146)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1d0fbdf4 09-Oct-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-16316: DOMXPath breaks when not initialized properly

Closes GH-16330.


# 30c58aba 14-Mar-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix potential memory leak in XPath evaluation results


# 90785dd8 12-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

[RFC] Improve callbacks in ext/dom and ext/xsl (#12627)


# 1492be52 13-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

[RFC] DOM HTML5 parsing and serialization support (#12111)


# 49b8168d 12-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cover more paths in dom_xpath_ext_function_php() with tests

Also removes an incorrect comment: we *do* need the special namespace
node handling code, otherwise we'd segfault.


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

Use zend_result as return for properties in ext/dom (#12113)


# 4dea42a3 02-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Preallocate result array size in xpath (#12105)

We know what size they're going to be, and we know they are packed
arrays. Prevent reallocations and initialisation overhead by setting th

Preallocate result array size in xpath (#12105)

We know what size they're going to be, and we know they are packed
arrays. Prevent reallocations and initialisation overhead by setting the
initial size and initializing it as packed from the start.

show more ...


# 20c9c4a3 02-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix validation logic of php:function() callbacks in dom and xsl

Two issues:
- Assumed that at least 1 argument (function name) was provided.
- Incorrect error path for the non-callab

Fix validation logic of php:function() callbacks in dom and xsl

Two issues:
- Assumed that at least 1 argument (function name) was provided.
- Incorrect error path for the non-callable case.

Closes GH-12593.

show more ...


# f2d673fb 08-Jun-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix #70359 and #78577: segfaults with DOMNameSpaceNode

* Fix type confusion and parent reference
* Manually manage the lifetime of the parent
* Add regression tests
* Break out t

Fix #70359 and #78577: segfaults with DOMNameSpaceNode

* Fix type confusion and parent reference
* Manually manage the lifetime of the parent
* Add regression tests
* Break out to a helper, and apply the use-after-free fix to xpath

Closes GH-11402.

show more ...


# 78127721 30-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11347: Memory leak when calling a static method inside an xpath query

It's a type confusion bug. `zend_make_callable` may change the function name
of the fci to become an array, c

Fix GH-11347: Memory leak when calling a static method inside an xpath query

It's a type confusion bug. `zend_make_callable` may change the function name
of the fci to become an array, causing a crash in debug mode on
`zval_ptr_dtor_str(&fci.function_name);` in `dom_xpath_ext_function_php`.
On a production build it doesn't crash but only causes a leak, because
the array elements are not destroyed, only the array container itself
is. We can use the nogc variant because it cannot contain cycles, the
potential array can only contain 2 strings.

Closes GH-11350.

show more ...


# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...


# 8fef83dd 19-Apr-2020 George Peter Banyard

Promote warnings to error in DOM extension

Closes GH-5418


# c98d4769 10-Sep-2020 Máté Kocsis

Consolidate new union type ZPP macro names

They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112


# d92229d8 06-Apr-2020 Nikita Popov

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument nam

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

RFC: https://wiki.php.net/rfc/named_params

Closes GH-5357.

show more ...


# d625c29d 17-Jul-2020 Nikita Popov

Remove spurious return true from DOMXPath::registerPhpFunctions()

Only one of three identical cases returned true, and the function
is documented to return void. Remove the outlier.


# d449d1db 17-Jul-2020 Nikita Popov

Use string|array type in DOMXPath::registerPhpFunctions()


# 302933da 07-Jul-2020 Nikita Popov

Remove no_separation flag


# 632766a5 07-Jul-2020 Nikita Popov

Disallow separation in a number of callbacks

All of these clearly do not need separation support.


# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758


# 62b1d2cb 12-May-2020 George Peter Banyard

Fix [-Wundef] warning in DOM extension


# dfd0acf0 11-Apr-2020 Máté Kocsis

Generate method entries for ext/dom

Closes GH-5374


# 305b17e8 29-Mar-2020 Máté Kocsis

Do not include the same stub multiple times

Closes GH-5322


# c5f091e4 09-Mar-2020 Nikita Popov

Remove DOM_GET_THIS macro

This macro is trivial, it's more obvious to use ZEND_THIS directly.


123456