Check existence panels shen creating debugger

[MAILPOET-3420]
This commit is contained in:
Pavel Dohnal
2021-03-25 14:33:08 +01:00
committed by Veljko V
parent 4bb44554c3
commit 2360fe0a5a
3 changed files with 16 additions and 4 deletions

View File

@ -190,7 +190,11 @@ class API {
throw new \Exception(__('HTTP request method not allowed.', 'mailpoet'));
}
if (class_exists(Debugger::class)) {
if (
class_exists(Debugger::class)
&& class_exists(DIPanel::class)
&& class_exists(ApiPanel::class)
) {
ApiPanel::init($endpoint, $this->requestMethod, $this->requestData);
DIPanel::init();
}