From 36bd93f1384ccf3f3ccd6fa884ad594d1b486367 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 07 Aug 2015 11:27:08 -0400 Subject: [PATCH] PHP7: Fixed some E_WARNING errors that previously were E_STRICT --- program/lib/Roundcube/rcube_ldap_generic.php | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php index 74ac7f7..d0b3576 100644 --- a/program/lib/Roundcube/rcube_ldap_generic.php +++ b/program/lib/Roundcube/rcube_ldap_generic.php @@ -57,12 +57,13 @@ * Get a specific LDAP entry, identified by its DN * * @param string $dn Record identifier + * @param array $attributes Attributes to return * * @return array Hash array */ - function get_entry($dn) + function get_entry($dn, $attributes = array()) { - return parent::get_entry($dn, $this->attributes); + return parent::get_entry($dn, !empty($attributes) ? $attributes : $this->attributes); } /** @@ -284,10 +285,11 @@ * Turn an LDAP entry into a regular PHP array with attributes as keys. * * @param array $entry Attributes array as retrieved from ldap_get_attributes() or ldap_get_entries() + * @param bool $flat Convert one-element-array values into strings (not implemented) * * @return array Hash array with attributes as keys */ - public static function normalize_entry($entry) + public static function normalize_entry($entry, $flat = false) { if (!isset($entry['count'])) { return $entry; -- Gitblit v1.9.1