diff vendor/symfony/var-dumper/Caster/Caster.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Caster/Caster.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/vendor/symfony/var-dumper/Caster/Caster.php	Fri Feb 23 15:52:07 2018 +0000
@@ -49,7 +49,7 @@
     public static function castObject($obj, $class, $hasDebugInfo = false)
     {
         if ($class instanceof \ReflectionClass) {
-            @trigger_error(sprintf('Passing a ReflectionClass to %s() is deprecated since version 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
+            @trigger_error(sprintf('Passing a ReflectionClass to %s() is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
             $hasDebugInfo = $class->hasMethod('__debugInfo');
             $class = $class->name;
         }
@@ -118,8 +118,8 @@
 
             if (null === $v) {
                 $type |= self::EXCLUDE_NULL & $filter;
-            }
-            if (empty($v)) {
+                $type |= self::EXCLUDE_EMPTY & $filter;
+            } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) {
                 $type |= self::EXCLUDE_EMPTY & $filter;
             }
             if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) {