diff options
author | Hilmar R <u02@u29lx193> | 2021-02-28 21:06:16 +0100 |
---|---|---|
committer | Hilmar R <u02@u29lx193> | 2021-03-01 18:48:11 +0100 |
commit | c26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch) | |
tree | 3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /vendor/ramsey/collection/src/Tool/ValueToStringTrait.php | |
parent | ea3390d626f85b7293a750958bfd1b5460958365 (diff) | |
download | volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2 volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip |
get dev
Diffstat (limited to 'vendor/ramsey/collection/src/Tool/ValueToStringTrait.php')
-rw-r--r-- | vendor/ramsey/collection/src/Tool/ValueToStringTrait.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php index 34a9a0a68..721ade002 100644 --- a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php +++ b/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php @@ -71,7 +71,12 @@ trait ValueToStringTrait return '(' . get_resource_type($value) . ' resource #' . (int) $value . ')'; } - // after this line $value is an object since is not null, scalar, array or resource + // If we don't know what it is, use var_export(). + if (!is_object($value)) { + return '(' . var_export($value, true) . ')'; + } + + // From here, $value should be an object. // __toString() is implemented if (is_callable([$value, '__toString'])) { |