From 5f1b8461045779966bb5e70954d4ff96dd2447d9 Mon Sep 17 00:00:00 2001 From: Nick Anstee Date: Tue, 19 Dec 2017 16:52:07 +0100 Subject: [PATCH] Stop the profiler when returning early Magento\Eav\Model\Config::getAttribute doesn't stop the Profiler when returning early, and thus incorrectly reports run time in these cases. Fix it by stopping the profiler before return --- app/code/Magento/Eav/Model/Config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Eav/Model/Config.php b/app/code/Magento/Eav/Model/Config.php index cc68709cd3b03..0eecca21b0d54 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -503,6 +503,7 @@ public function getAttribute($entityType, $code) } if (isset($this->attributes[$entityTypeCode][$code])) { + \Magento\Framework\Profiler::stop('EAV: ' . __METHOD__); return $this->attributes[$entityTypeCode][$code]; }