Skip to content

Commit 6eb10dc

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: libxml: Fix input buffer deprecation
2 parents 4eacb6d + 8c24077 commit 6eb10dc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ext/libxml/libxml.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ static int php_libxml_streams_IO_close(void *context)
525525
return php_stream_close((php_stream*)context);
526526
}
527527

528+
/* TODO: This needs to be replaced by context-specific APIs in the future! */
528529
static xmlParserInputBufferPtr
529530
php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
530531
{
@@ -558,13 +559,10 @@ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
558559
}
559560

560561
/* Allocate the Input buffer front-end. */
561-
ret = xmlAllocParserInputBuffer(enc);
562-
if (ret != NULL) {
563-
ret->context = context;
564-
ret->readcallback = php_libxml_streams_IO_read;
565-
ret->closecallback = php_libxml_streams_IO_close;
566-
} else
562+
ret = xmlParserInputBufferCreateIO(php_libxml_streams_IO_read, php_libxml_streams_IO_close, context, enc);
563+
if (ret == NULL) {
567564
php_libxml_streams_IO_close(context);
565+
}
568566

569567
return(ret);
570568
}

0 commit comments

Comments
 (0)