diff options
author | Max Kostikov <max@kostikov.co> | 2021-02-20 13:39:54 +0000 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2021-02-20 13:39:54 +0000 |
commit | cc5571687971ddcc097abb5e5c57689005d5b070 (patch) | |
tree | 1b2ed0f46b307f09d109350f777438fd04742905 /vendor/ramsey/collection/src/Tool/ValueToStringTrait.php | |
parent | e1d622c49f95aec51e5c1bd521dcd6fe2a9a5372 (diff) | |
parent | ddad4f604b56656086b32992ef98709be2568a37 (diff) | |
download | volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.tar.gz volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.tar.bz2 volse-hubzilla-cc5571687971ddcc097abb5e5c57689005d5b070.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!1
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'])) { |