File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 88use Magento \Framework \App \Helper \Context ;
99use Magento \Store \Model \StoreManagerInterface ;
1010use Magento \Framework \App \Helper \AbstractHelper ;
11+ use Magento \Framework \Exception \LocalizedException ;
1112use Magento \Framework \App \ProductMetadataInterface ;
1213
1314class Data extends AbstractHelper
@@ -102,13 +103,6 @@ public function collectModuleConfig()
102103 */
103104 public function isActive ()
104105 {
105- try {
106- $ this ->appState ->setAreaCode (Area::AREA_GLOBAL );
107- } catch (\Magento \Framework \Exception \LocalizedException $ e ) {
108- // intentionally left empty
109- // var_dump($e);
110- }
111-
112106 return (! empty ($ this ->config ) && array_key_exists ('enabled ' , $ this ->config ) && $ this ->config ['enabled ' ] && ($ this ->isProductionMode () || $ this ->isOverwriteProductionMode ()));
113107 }
114108
@@ -117,6 +111,12 @@ public function isActive()
117111 */
118112 public function isProductionMode ()
119113 {
114+ try {
115+ $ this ->appState ->setAreaCode (Area::AREA_GLOBAL );
116+ } catch (LocalizedException $ e ) {
117+ //intentionally left empty
118+ }
119+
120120 return $ this ->getAppState () == 'production ' ;
121121 }
122122
Original file line number Diff line number Diff line change 22 "name" : " justbetter/magento2-sentry" ,
33 "description" : " Magento 2 Logger for Sentry" ,
44 "type" : " magento2-module" ,
5- "version" : " 0.4.2 " ,
5+ "version" : " 0.4.3 " ,
66 "license" : " MIT" ,
77 "require" : {
88 "php" : " >=7.0" ,
You can’t perform that action at this time.
0 commit comments