diff vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php	Mon Apr 23 09:46:53 2018 +0100
@@ -23,10 +23,7 @@
 {
     public function __construct()
     {
-        $this->data = array(
-            'memory' => 0,
-            'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
-        );
+        $this->reset();
     }
 
     /**
@@ -40,6 +37,17 @@
     /**
      * {@inheritdoc}
      */
+    public function reset()
+    {
+        $this->data = array(
+            'memory' => 0,
+            'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
     public function lateCollect()
     {
         $this->updateMemoryUsage();
@@ -99,8 +107,11 @@
 
         switch (substr($memoryLimit, -1)) {
             case 't': $max *= 1024;
+            // no break
             case 'g': $max *= 1024;
+            // no break
             case 'm': $max *= 1024;
+            // no break
             case 'k': $max *= 1024;
         }