freebsd-ports/net/phpldapadmin/files/patch-lib_xml2array.php
Krzysztof fee2b338d2
net/phpldapadmin: fix support for php81+
PR:	266678
Reported by:	Gerard Seibert
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D37513
2022-12-01 10:53:34 +01:00

20 lines
573 B
PHP

--- lib/xml2array.php.orig 2021-12-12 02:35:51 UTC
+++ lib/xml2array.php
@@ -59,7 +59,7 @@ class xml2array {
}
private function tagOpen($parser,$name,$attrs) {
- $name = strtolower($name);
+ $name = strtolower((string) $name);
if (isset($this->stack_ref[$name])) {
if (! isset($this->stack_ref[$name][0])) {
@@ -86,7 +86,7 @@ class xml2array {
}
private function tagData($parser,$tagData) {
- if (trim($tagData) != '') {
+ if (trim((string) $tagData) != '') {
if (isset($this->stack_ref['#text']))
$this->stack_ref['#text'] .= $tagData;