From 1fde9eb5830cb4f58ca534a9ebec7ad683fe4fff Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 29 May 2026 01:02:32 +0200 Subject: [PATCH] lib/php/db/types/ldap.php --- lib/php/db/types/ldap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/php/db/types/ldap.php b/lib/php/db/types/ldap.php index da78b0f6..94623c3b 100644 --- a/lib/php/db/types/ldap.php +++ b/lib/php/db/types/ldap.php @@ -25,6 +25,7 @@ $DB_TYPES['ldap'] = [ 'rows_prepare' => function($table,$sql) { $fields = (empty($table->fields_only) ? array_keys($table->fields()) : $table->fields_only); $table->replace_fields($fields); + #bye(array_keys($table->fields)); $GLOBALS['LDAP_CONN']->prepare($sql,['attrs'=>$fields]); return $GLOBALS['LDAP_CONN']; }, @@ -33,6 +34,10 @@ $DB_TYPES['ldap'] = [ if (!$row) return []; $fields = (empty($table->fields_only) ? array_keys($table->fields()) : $table->fields_only); $row = $GLOBALS['LDAP_CONN']->ar_filter_keys($row,$fields); + # NB 29.05.26: Add missing + foreach(array_keys($table->fields()) as $f) { + if (!isset($row[$f])) $row[$f] = ''; + } $table->fields_only($row,$fields); # reorder by fields return $row; }, -- 2.47.3