Merge pull request #318 from robbieaverill/patch-1

FIX Ensure that __toString return value is always casted as a string
This commit is contained in:
Vladimir Razuvaev 2018-07-30 13:29:34 +07:00 committed by GitHub
commit 48b44fbdc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ abstract class Node
public function __toString() public function __toString()
{ {
$tmp = $this->toArray(true); $tmp = $this->toArray(true);
return json_encode($tmp); return (string) json_encode($tmp);
} }
/** /**