freebsd-ports/net/phpldapadmin/files/patch-htdocs_cmd.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

11 lines
543 B
PHP

--- htdocs/cmd.php.orig 2021-12-12 02:35:51 UTC
+++ htdocs/cmd.php
@@ -41,7 +41,7 @@ if (DEBUG_ENABLED)
$www['page'] = new page($app['server']->getIndex());
# See if we can render the command
-if (trim($www['cmd'])) {
+if (trim((string) $www['cmd'])) {
# If this is a READ-WRITE operation, the LDAP server must not be in READ-ONLY mode.
if ($app['server']->isReadOnly() && ! in_array(get_request('cmd','REQUEST'),$app['readwrite_cmds']))
error(_('You cannot perform updates while server is in read-only mode'),'error','index.php');