From b5a37edc9818f02baac750d9d3901d0ff642f768 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 10 Apr 2018 19:46:41 +0200 Subject: [PATCH] PHP 7.2 --- lam/lib/types/user.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index 721c7741..62563b70 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -720,8 +720,8 @@ class lamUserList extends lamList { } } // show user photos - elseif (($attribute == "jpegphoto") && (sizeof($entry[$attribute][0]) > 0)) { - if (sizeof($entry[$attribute][0]) < 100) { + elseif (($attribute == "jpegphoto") && (!empty($entry[$attribute][0]))) { + if (strlen($entry[$attribute][0]) < 100) { // looks like we have read broken binary data, reread photo $result = @ldap_read($_SESSION['ldap']->server(), escapeDN($entry['dn']), $attribute . "=*", array($attribute), 0, 0, 0, LDAP_DEREF_NEVER); if ($result) {