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

Commit 316b203

Browse files
Merge branch '2.7' into 2.8
* 2.7: [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 6041920 + aec192d commit 316b203

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
@@ -263,7 +263,10 @@ private function flattenArgs($args, $level = 0, &$count = 0)
263263
if (++$count > 1e4) {
264264
return array('array', '*SKIPPED over 10000 entries*');
265265
}
266-
if (is_object($value)) {
266+
if ($value instanceof \__PHP_Incomplete_Class) {
267+
// is_object() returns false on PHP<=7.1
268+
$result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
269+
} elseif (is_object($value)) {
267270
$result[$key] = array('object', get_class($value));
268271
} elseif (is_array($value)) {
269272
if ($level > 10) {
@@ -277,9 +280,6 @@ private function flattenArgs($args, $level = 0, &$count = 0)
277280
$result[$key] = array('boolean', $value);
278281
} elseif (is_resource($value)) {
279282
$result[$key] = array('resource', get_resource_type($value));
280-
} elseif ($value instanceof \__PHP_Incomplete_Class) {
281-
// Special case of object, is_object will return false
282-
$result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
283283
} else {
284284
$result[$key] = array('string', (string) $value);
285285
}

0 commit comments

Comments
 (0)