Fix json_encode return type

This commit is contained in:
Dennis Eichhorn 2018-07-14 18:43:34 +02:00
parent 3f1571fba3
commit a5c49463f6

View File

@ -335,7 +335,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
* *
* @param string $title News article title * @param string $title News article title
* *
* @return mixed * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
@ -452,7 +452,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
*/ */
public function __toString() public function __toString()
{ {
return \json_encode($this->toArray()); return (string) \json_encode($this->toArray());
} }
/** /**