From 4e5eb3b828805ce82c7c2722522d0e9add70c173 Mon Sep 17 00:00:00 2001
From: Lukas Reschke <lukas@owncloud.com>
Date: Wed, 14 Oct 2015 22:35:46 +0200
Subject: 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
---
 apps/user_ldap/lib/configuration.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'apps')

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':
-- 
cgit v1.2.3