File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -299,12 +299,12 @@ public function getActorId() {
299299 public function setActor ($ actorType , $ actorId ) {
300300 if (
301301 !is_string ($ actorType ) || !trim ($ actorType )
302- || !is_string ($ actorId ) || ! trim ( $ actorId)
302+ || !is_string ($ actorId ) || $ actorId === ''
303303 ) {
304304 throw new \InvalidArgumentException ('String expected. ' );
305305 }
306306 $ this ->data ['actorType ' ] = trim ($ actorType );
307- $ this ->data ['actorId ' ] = trim ( $ actorId) ;
307+ $ this ->data ['actorId ' ] = $ actorId ;
308308 return $ this ;
309309 }
310310
@@ -385,7 +385,7 @@ public function getObjectId() {
385385 public function setObject ($ objectType , $ objectId ) {
386386 if (
387387 !is_string ($ objectType ) || !trim ($ objectType )
388- || !is_string ($ objectId ) || ! trim ($ objectId )
388+ || !is_string ($ objectId ) || trim ($ objectId ) === ''
389389 ) {
390390 throw new \InvalidArgumentException ('String expected. ' );
391391 }
Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ public function getCommentFromData(array $data): IComment {
118118 */
119119 protected function prepareCommentForDatabaseWrite (IComment $ comment ) {
120120 if (!$ comment ->getActorType ()
121- || ! $ comment ->getActorId ()
121+ || $ comment ->getActorId () === ''
122122 || !$ comment ->getObjectType ()
123- || ! $ comment ->getObjectId ()
123+ || $ comment ->getObjectId () === ''
124124 || !$ comment ->getVerb ()
125125 ) {
126126 throw new \UnexpectedValueException ('Actor, Object and Verb information must be provided for saving ' );
You can’t perform that action at this time.
0 commit comments