diff options
author | Joas Schilling <coding@schilljs.com> | 2019-09-25 09:07:07 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-09-25 09:07:07 +0200 |
commit | e4b36f4f47e40529fd41a0b0c55a68a093f725f1 (patch) | |
tree | bc1a784e7f252ff853017455088c3b22586da54c /lib/private/Comments/Comment.php | |
parent | 61d22ff6cf54af0250a9917ab1b30a5dff1cb236 (diff) | |
download | nextcloud-server-e4b36f4f47e40529fd41a0b0c55a68a093f725f1.tar.gz nextcloud-server-e4b36f4f47e40529fd41a0b0c55a68a093f725f1.zip |
Fix user with id 0 to be able to comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Comments/Comment.php')
-rw-r--r-- | lib/private/Comments/Comment.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index c9862c64ca6..7c935930f28 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -299,12 +299,12 @@ class Comment implements IComment { public function setActor($actorType, $actorId) { if( !is_string($actorType) || !trim($actorType) - || !is_string($actorId) || !trim($actorId) + || !is_string($actorId) || $actorId === '' ) { throw new \InvalidArgumentException('String expected.'); } $this->data['actorType'] = trim($actorType); - $this->data['actorId'] = trim($actorId); + $this->data['actorId'] = $actorId; return $this; } @@ -385,7 +385,7 @@ class Comment implements IComment { public function setObject($objectType, $objectId) { if( !is_string($objectType) || !trim($objectType) - || !is_string($objectId) || !trim($objectId) + || !is_string($objectId) || trim($objectId) === '' ) { throw new \InvalidArgumentException('String expected.'); } |