Skip to content

Commit 57e37ea

Browse files
committed
fix: correct variable naming and syntax errors in webhook actions
1 parent 6dc63b0 commit 57e37ea

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Core/Notification/Action/_ActionWebhook.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ protected function _DoExecute($oTrigger, $aContextArgs, &$oLog)
173173
}
174174

175175
// Errors during preparation
176-
if (!empty($this->m_aWebrequestErrors))
176+
if (!empty($this->aRequestErrors))
177177
{
178-
return 'Errors: '.implode(', ', $this->m_aWebrequestErrors);
178+
return 'Errors: '.implode(', ', $this->aRequestErrors);
179179
}
180180

181181
if ($this->IsBeingTested() && empty($oRequest->GetURL()))
@@ -197,7 +197,7 @@ protected function _DoExecute($oTrigger, $aContextArgs, &$oLog)
197197
case WebRequestSender::ENUM_SEND_STATE_PENDING:
198198
return 'Pending';
199199

200-
case WebRequestSender::ENUM_SEND_STATE_ERROR;
200+
case WebRequestSender::ENUM_SEND_STATE_ERROR:
201201
return 'Errors: '.implode(', ', $this->aRequestErrors);
202202
}
203203
}

tests/php-unit-tests/_ActionWebhookTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
use Combodo\iTop\Service\CallbackService;
1414
use Combodo\iTop\Test\UnitTest\ItopTestCase;
1515
use DBObject;
16-
use Exception;
17-
use ReflectionException;
1816

1917
class _ActionWebhookTest extends ItopTestCase
2018
{

0 commit comments

Comments
 (0)