diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
| commit | 2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch) | |
| tree | 25f0138e1af8902b92dacc8cce09b267447c17db /textproc/php81-xml/files/patch-compat.c | |
| parent | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff) | |
| parent | 1a30da80670973368b399f2b01fe9c04b91a1273 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'textproc/php81-xml/files/patch-compat.c')
| -rw-r--r-- | textproc/php81-xml/files/patch-compat.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/textproc/php81-xml/files/patch-compat.c b/textproc/php81-xml/files/patch-compat.c index 02125961b20c..af608e129191 100644 --- a/textproc/php81-xml/files/patch-compat.c +++ b/textproc/php81-xml/files/patch-compat.c @@ -1,6 +1,6 @@ ---- compat.c.orig Tue Jul 20 10:55:02 2004 -+++ compat.c Tue Jul 20 10:55:55 2004 -@@ -16,6 +16,10 @@ +--- compat.c.orig 2025-07-01 21:17:52 UTC ++++ compat.c +@@ -14,6 +14,10 @@ +----------------------------------------------------------------------+ */ @@ -9,5 +9,16 @@ +#endif + #include "php.h" - #if defined(HAVE_LIBXML) && defined(HAVE_XML) && !defined(HAVE_LIBEXPAT) + #if defined(HAVE_LIBXML) && (defined(HAVE_XML) || defined(HAVE_XMLRPC)) && !defined(HAVE_LIBEXPAT) #include "expat_compat.h" +@@ -375,7 +379,9 @@ _get_entity(void *user, const xmlChar *name) + if (ret == NULL) + ret = xmlGetDocEntity(parser->parser->myDoc, name); + +- if (ret == NULL || (parser->parser->instate != XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)) { ++/* Fix parse error on some XML files so that devel/pear work again. */ ++/* See https://github.com/php/php-src/issues/14834 for details. */ ++ if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) { + if (ret == NULL || ret->etype == XML_INTERNAL_GENERAL_ENTITY || ret->etype == XML_INTERNAL_PARAMETER_ENTITY || ret->etype == XML_INTERNAL_PREDEFINED_ENTITY) { + /* Predefined entities will expand unless no cdata handler is present */ + if (parser->h_default && ! (ret && ret->etype == XML_INTERNAL_PREDEFINED_ENTITY && parser->h_cdata)) { |
