From 6af6febad05a4619a6482536c1bddd2fe1925148 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 9 Dec 2015 16:25:31 +0100 Subject: php < 5.5 compatible --- lib/private/comments/comment.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/private/comments') diff --git a/lib/private/comments/comment.php b/lib/private/comments/comment.php index 15d721d099a..219e7ec8e4b 100644 --- a/lib/private/comments/comment.php +++ b/lib/private/comments/comment.php @@ -194,7 +194,7 @@ class Comment implements IComment { * @since 9.0.0 */ public function setVerb($verb) { - if(!is_string($verb) || empty(trim($verb))) { + if(!is_string($verb) || !trim($verb)) { throw new \InvalidArgumentException('Non-empty String expected.'); } $this->data['verb'] = trim($verb); @@ -231,8 +231,8 @@ class Comment implements IComment { */ public function setActor($actorType, $actorId) { if( - !is_string($actorType) || empty(trim($actorType)) - || !is_string($actorId) || empty(trim($actorId)) + !is_string($actorType) || !trim($actorType) + || !is_string($actorId) || !trim($actorId) ) { throw new \InvalidArgumentException('String expected.'); } @@ -317,8 +317,8 @@ class Comment implements IComment { */ public function setObject($objectType, $objectId) { if( - !is_string($objectType) || empty(trim($objectType)) - || !is_string($objectId) || empty(trim($objectId)) + !is_string($objectType) || !trim($objectType) + || !is_string($objectId) || !trim($objectId) ) { throw new \InvalidArgumentException('String expected.'); } -- cgit v1.2.3