This commit is contained in:
Olusesan Ameye
2022-10-02 00:26:03 +00:00
parent f8b7061089
commit b4604e02b5
17 changed files with 69 additions and 44 deletions
+11 -2
View File
@@ -34,6 +34,7 @@ use Kint\Zval\ResourceValue;
use Kint\Zval\Value;
use ReflectionObject;
use stdClass;
use TypeError;
class Parser
{
@@ -191,6 +192,10 @@ class Parser
public function childHasPath(InstanceValue $parent, Value $child)
{
if ('__PHP_Incomplete_Class' === $parent->classname) {
return false;
}
if ('object' === $parent->type && (null !== $parent->access_path || $child->static || $child->const)) {
if (Value::ACCESS_PUBLIC === $child->access) {
return true;
@@ -434,7 +439,7 @@ class Parser
$rep = new Representation('Properties');
if (KINT_PHP74) {
if (KINT_PHP74 && '__PHP_Incomplete_Class' != $object->classname) {
$rprops = $reflector->getProperties();
foreach ($rprops as $rprop) {
@@ -524,7 +529,11 @@ class Parser
}
$stash = $val;
$copy[$i] = $refmarker;
try {
$copy[$i] = $refmarker;
} catch (TypeError $e) {
$child->reference = true;
}
if ($val === $refmarker) {
$child->reference = true;
$val = $stash;