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

Commit 34f6ac1

Browse files
Merge branch '2.8' into 3.1
* 2.8: [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 053d556 + 316b203 commit 34f6ac1

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) {
@@ -236,9 +239,6 @@ private function flattenArgs($args, $level = 0, &$count = 0)
236239
$result[$key] = array('boolean', $value);
237240
} elseif (is_resource($value)) {
238241
$result[$key] = array('resource', get_resource_type($value));
239-
} elseif ($value instanceof \__PHP_Incomplete_Class) {
240-
// Special case of object, is_object will return false
241-
$result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
242242
} else {
243243
$result[$key] = array('string', (string) $value);
244244
}

0 commit comments

Comments
 (0)