From b8258988b106e92c318c6e215b707831ce9c7eff Mon Sep 17 00:00:00 2001 From: Wlad Meixner Date: Mon, 27 Jul 2020 16:58:31 +0200 Subject: [PATCH] bootstrap: magento --- lib/Foomo/Magento2/Boostrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Foomo/Magento2/Boostrap.php b/lib/Foomo/Magento2/Boostrap.php index eb67040..6e099db 100644 --- a/lib/Foomo/Magento2/Boostrap.php +++ b/lib/Foomo/Magento2/Boostrap.php @@ -18,8 +18,11 @@ class Boostrap */ public static function bootstrap() { + if (!class_exists('\Magento\Framework\App\Bootstrap')) { return self::init(); + } else if(!self::$bootstrap) { + self::$bootstrap = Bootstrap::create(BP, $_SERVER); } return self::$bootstrap; } @@ -63,6 +66,7 @@ class Boostrap { if (!class_exists('\Magento\Framework\App\Bootstrap')) { self::init(); + } else { } return \Magento\Framework\App\ObjectManager::getInstance();