File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,13 @@ public function saveStatistics(ConsoleTerminateEvent $event)
74
74
75
75
$ configGlobalAsArray = $ this ->configurationManager ->getConfigGlobalAsArray ();
76
76
77
- //Validate if the config is enable.
78
- if (is_null ($ configGlobalAsArray ) || !$ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) {
77
+ //Validate if the config is defined.
78
+ if (is_null ($ configGlobalAsArray ) || !isset ($ configGlobalAsArray ['application ' ]['statistics ' ])) {
79
+ return ;
80
+ }
81
+
82
+ //Validate if the statistics is enabled.
83
+ if (!isset ($ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) || !$ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) {
79
84
return ;
80
85
}
81
86
Original file line number Diff line number Diff line change @@ -67,8 +67,13 @@ public function calculateStatistics(ConsoleTerminateEvent $event)
67
67
$ date = date ('Y-m-d ' );
68
68
$ configGlobalAsArray = $ this ->configurationManager ->getConfigGlobalAsArray ();
69
69
70
- //Validate if the config is enable.
71
- if (is_null ($ configGlobalAsArray ) || !$ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) {
70
+ //Validate if the config is defined.
71
+ if (is_null ($ configGlobalAsArray ) || !isset ($ configGlobalAsArray ['application ' ]['statistics ' ])) {
72
+ return ;
73
+ }
74
+
75
+ //Validate if the statistics is enabled.
76
+ if (!isset ($ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) || !$ configGlobalAsArray ['application ' ]['statistics ' ]['enabled ' ]) {
72
77
return ;
73
78
}
74
79
You can’t perform that action at this time.
0 commit comments