History log of /PHP-8.2/ext/libxml/libxml.c (Results 1 – 25 of 238)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 4fe82131 04-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Backport libxml2 2.13.2 fixes (#14816)

Backproted from https://github.com/php/php-src/pull/14789


# 0a39890c 01-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix libxml2 2.12 build due to API breaks

See https://github.com/php/php-src/actions/runs/7062192818/job/19225478601

# dc1a70c2 06-May-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix GH-11160: Few tests failed building with new libxml 2.11.0


# 7c0dfc5c 29-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the test and
modify the error message. Or if the change in error message is
small, we use the EXPECTF matchers to make the test compatible with both
old and new versions of libxml2.
- Missing warnings. This is caused by a change in libxml2 where the
parser started using SAX APIs internally [1]. In this case the
error_type passed to php_libxml_internal_error_handler() changed from
PHP_LIBXML_ERROR to PHP_LIBXML_CTX_WARNING because it internally
started to use the SAX handlers instead of the generic handlers.
However, for the SAX handlers the current input stack is empty, so
nothing is actually printed. I fixed this by falling back to a
regular warning without a filename & line number reference, which
mimicks the old behaviour. Furthermore, this change now also shows
an additional warning in a test which was previously hidden.

[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/9a82b94a94bd310db426edd453b0f38c6c8f69f5

Closes GH-11162.

show more ...

# 11796229 21-Jan-2022 Tim Starling

Add libxml_get_external_entity_loader()

Add libxml_get_external_entity_loader(), which returns the currently
installed external entity loader, i.e. the value which was passed to
libx

Add libxml_get_external_entity_loader()

Add libxml_get_external_entity_loader(), which returns the currently
installed external entity loader, i.e. the value which was passed to
libxml_set_external_entity_loader() or null if no loader was installed
and the default entity loader will be used.

This allows libraries to save and restore the loader, controlling entity
expansion without interfering with the rest of the application.

Add macro Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(). This allows us to get the
zval for a callable parameter without duplicating callable argument
parsing.

The saved zval keeps the object needed for fcc/fci alive, simplifying
memory management.

Fixes #76763.

show more ...

# 145525bc 25-Aug-2022 Christoph M. Becker

Merge branch 'PHP-8.1'

* PHP-8.1:
xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0


# afc5ab45 25-Aug-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0


# f5975469 24-Aug-2022 Christoph M. Becker

xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0

The documentation[1] suggest to call `xmlCleanupParser()` instead, but
we are not doing that for reasons[2]. Thus, we do no l

xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0

The documentation[1] suggest to call `xmlCleanupParser()` instead, but
we are not doing that for reasons[2]. Thus, we do no longer call
`xmlRelaxNGCleanupTypes()` for libxml2 ≥ 2.10.0.

[1] <https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-relaxng.html#xmlRelaxNGCleanupTypes>
[2] <https://github.com/php/php-src/commit/8742276eb3905eb97a585417000c7b8df85006d4>

Closes GH-9417.

show more ...

# 7601068f 09-Jun-2022 Máté Kocsis

Declare ext/libxml constants in stubs (#8721)

# 2f529569 29-Dec-2021 Ilija Tovilo

Optimize stripos/stristr

Closes GH-7847
Closes GH-7852

Previously stripos/stristr would lowercase both the haystack and the
needle to reuse strpos. The approach in this PR i

Optimize stripos/stristr

Closes GH-7847
Closes GH-7852

Previously stripos/stristr would lowercase both the haystack and the
needle to reuse strpos. The approach in this PR is similar to strpos.
memchr is highly optimized so we're using it to search for the first
character of the needle in the haystack. If we find it we compare the
remaining characters of the needle manually.

The new implementation seems to perform about half as well as strpos (as
two memchr calls are necessary to find the next candidate).

show more ...

# 9de4eb9e 15-Nov-2021 Stanislav Malyshev

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix #79971: special character is breaking the path in xml function


# 9d74c5b4 15-Nov-2021 Stanislav Malyshev

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #79971: special character is breaking the path in xml function


# 0ef1dfc9 15-Nov-2021 Stanislav Malyshev

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #79971: special character is breaking the path in xml function


# ca87d46a 15-Nov-2021 Stanislav Malyshev

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Fix #79971: special character is breaking the path in xml function


# f15f8fc5 01-Sep-2020 Christoph M. Becker

Fix #79971: special character is breaking the path in xml function

The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters. Per

Fix #79971: special character is breaking the path in xml function

The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters. Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would. We catch
those, and let the functions fail with a respective warning.

show more ...

# 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 ...

# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 6adec555 24-Mar-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8


# 5832be76 24-Mar-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8


# 498eb8e0 23-Mar-2021 Christoph M. Becker

Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8

A string passed to `php_libxml_xmlCheckUTF8()` may be longer than
1<<31-1 bytes, so we're better using a `size_t`.

C

Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8

A string passed to `php_libxml_xmlCheckUTF8()` may be longer than
1<<31-1 bytes, so we're better using a `size_t`.

Closes GH-6802.

show more ...

# 9f826e8c 08-Mar-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #51903: simplexml_load_file() doesn't use HTTP headers


# 79319568 08-Mar-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #51903: simplexml_load_file() doesn't use HTTP headers


# f901bec4 03-Mar-2021 Christoph M. Becker

Fix #51903: simplexml_load_file() doesn't use HTTP headers

The `encoding` attribute of the XML declaration is optional; it is good
practice to use external encoding information where ava

Fix #51903: simplexml_load_file() doesn't use HTTP headers

The `encoding` attribute of the XML declaration is optional; it is good
practice to use external encoding information where available if it is
missing. Thus, we check for `charset` info of `Content-Type` headers,
and see whether the encoding is supported.

We cater to trailing parameters and quoted-strings, but not to escaped
backslashes and quotes in quoted-strings, since no known character
encoding contains these anyway.

Co-authored-by: Michael Wallner <mike@php.net>

Closes GH-6747.

show more ...

# 1954e597 26-Jan-2021 Máté Kocsis

Add support for generating class entries from stubs

Closes GH-6289

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

# 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 ...

12345678910