diff options
author | Mario <mario@mariovavti.com> | 2021-02-15 18:29:24 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-02-15 18:29:24 +0000 |
commit | 02401ea9fd5d53f590305c0f9834685cda58723d (patch) | |
tree | e60e292f8ae389c3a353dafda37003b4c15a45d5 /vendor/ramsey/collection/src/Tool/ValueToStringTrait.php | |
parent | 18c8f1b903e90ca3632520b90d21ec3770bf6e0b (diff) | |
download | volse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.tar.gz volse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.tar.bz2 volse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.zip |
composer update ramsey/collection
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'])) { |