mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
The phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch fixes an error you
get under php-8.1 when "$server->getContainer($base->getDN())" returns a
null object (that's the case if you have a short, one component, rootdn
in your "$servers->setValue('server','base',array(...)" config.
Closes: https://bugs.gentoo.org/897680
Signed-off-by: protegh <protegh@users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/32081
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
17 lines
1.2 KiB
Diff
17 lines
1.2 KiB
Diff
https://bugs.gentoo.org/897680
|
|
|
|
This fixes an error you get under php-8.1 when "$server->getContainer($base->getDN())"
|
|
returns a null object (that's the case if you have a short, one component, rootdn in your
|
|
"$servers->setValue('server','base',array(...)" config.
|
|
--- a/lib/HTMLTree.php
|
|
+++ b/lib/HTMLTree.php
|
|
@@ -98,7 +98,7 @@
|
|
$this->javascript .= '<div>';
|
|
$this->javascript .= '<input type="hidden" name="cmd" value="template_engine" />';
|
|
$this->javascript .= sprintf('<input type="hidden" name="server_id" value="%s" />',$server->getIndex());
|
|
- $this->javascript .= sprintf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($server->getContainer($base->getDN())));
|
|
+ $this->javascript .= sprintf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($server->getContainer($base->getDN()) ?? ''));
|
|
$this->javascript .= sprintf('<input type="hidden" name="rdn" value="%s" />',get_rdn($base->getDN()));
|
|
$this->javascript .= sprintf('<input type="hidden" name="rdn_attribute[]" value="%s" />',$rdn[0]);
|
|
$this->javascript .= sprintf('<input type="hidden" name="new_values[%s][]" value="%s" />',$rdn[0],$rdn[1]);
|