diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-14 22:35:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-10-14 22:35:46 +0200 |
commit | 4e5eb3b828805ce82c7c2722522d0e9add70c173 (patch) | |
tree | 732c5ae772da31257ebb6e659a4f577c9174932f /apps/user_ldap | |
parent | 905474ebd45275c1a28efae73954e8a0dd544c53 (diff) | |
download | nextcloud-server-4e5eb3b828805ce82c7c2722522d0e9add70c173.tar.gz nextcloud-server-4e5eb3b828805ce82c7c2722522d0e9add70c173.zip |
Remove arbitrary expression in empty
Those are only allowed in PHP 5.5, thus making our code incompatible with PHP 5.4
Fixes https://github.com/owncloud/core/issues/19793
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/configuration.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php index 6e62f5730b9..4a6263de9aa 100644 --- a/apps/user_ldap/lib/configuration.php +++ b/apps/user_ldap/lib/configuration.php @@ -150,8 +150,9 @@ class Configuration { $setMethod = 'setRawValue'; break; case 'homeFolderNamingRule': - if(!empty(trim($val)) && strpos($val, 'attr:') === false) { - $val = 'attr:'.trim($val); + $trimmedVal = trim($val); + if(!empty($trimmedVal) && strpos($val, 'attr:') === false) { + $val = 'attr:'.$trimmedVal; } break; case 'ldapBase': |