Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 7ad9b6d

Browse files
Merge branch '3.1'
* 3.1: [ClassLoader] Fix tests [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes [DependencyInjection] PhpDumper::isFrozen inconsistency [DI] Cleanup array_key_exists include dynamic services in list of alternatives [Debug] Swap dumper services at bootstrap
2 parents 20295a8 + 34f6ac1 commit 7ad9b6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Exception/FlattenException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ private function flattenArgs($args, $level = 0, &$count = 0)
222222
if (++$count > 1e4) {
223223
return array('array', '*SKIPPED over 10000 entries*');
224224
}
225-
if (is_object($value)) {
225+
if ($value instanceof \__PHP_Incomplete_Class) {
226+
// is_object() returns false on PHP<=7.1
227+
$result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
228+
} elseif (is_object($value)) {
226229
$result[$key] = array('object', get_class($value));
227230
} elseif (is_array($value)) {
228231
if ($level > 10) {
@@ -240,9 +243,6 @@ private function flattenArgs($args, $level = 0, &$count = 0)
240243
$result[$key] = array('float', $value);
241244
} elseif (is_resource($value)) {
242245
$result[$key] = array('resource', get_resource_type($value));
243-
} elseif ($value instanceof \__PHP_Incomplete_Class) {
244-
// Special case of object, is_object will return false
245-
$result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
246246
} else {
247247
$result[$key] = array('string', (string) $value);
248248
}

0 commit comments

Comments
 (0)