File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,7 @@ function get_object_dump_props(
516516 ?int $ filter = null ,
517517 ?array &$ ignores = []
518518 ): array {
519+ /** @var array[] $cache */
519520 static $ cache = [];
520521 $ isObject = is_object ($ object );
521522 $ key = ($ isObject ? get_class ($ object ) : $ object ) . '| ' . $ filter ;
@@ -535,11 +536,6 @@ function get_object_dump_props(
535536 foreach ($ props as $ prop ) {
536537 $ name = $ prop ->getName ();
537538
538- if ($ isObject && !$ prop ->isInitialized ($ object )) {
539- $ ignores [$ prop ->getName ()] = $ prop ;
540- continue ;
541- }
542-
543539 if ($ prop ->isProtected () || $ prop ->isPrivate () || $ prop ->isVirtual ()) {
544540 if (
545541 !($ filter & \ReflectionProperty::IS_VIRTUAL )
@@ -569,6 +565,7 @@ function get_object_dump_values(
569565 object $ object ,
570566 ?int $ filter = null
571567 ): array {
568+ /** @var array[] $cache */
572569 static $ cache = [];
573570 $ cacheKey = $ object ::class . '| ' . ($ filter ?? 'all ' );
574571
@@ -592,6 +589,10 @@ function get_object_dump_values(
592589 continue ;
593590 }
594591
592+ if (!$ prop ->isInitialized ($ object )) {
593+ continue ;
594+ }
595+
595596 $ vars [$ name ] = $ prop ->getValue ($ object );
596597 }
597598
You can’t perform that action at this time.
0 commit comments