diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-09 16:25:31 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-09 16:25:31 +0100 |
commit | 6af6febad05a4619a6482536c1bddd2fe1925148 (patch) | |
tree | 17bb20ab5454f0c457550982e538cce8be3b5b8c /lib/private/comments | |
parent | 8e298f51f84f0cca7f3ae51fa095bcabd06e8cdd (diff) | |
download | nextcloud-server-6af6febad05a4619a6482536c1bddd2fe1925148.tar.gz nextcloud-server-6af6febad05a4619a6482536c1bddd2fe1925148.zip |
php < 5.5 compatible
Diffstat (limited to 'lib/private/comments')
-rw-r--r-- | lib/private/comments/comment.php | 10 |
1 files changed, 5 insertions, 5 deletions
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.'); } |