Fix closure capture for M2 log mode flag

This commit is contained in:
DevSoftTech Server 2026-06-26 23:58:00 +05:30
parent 8c46a155ac
commit c7c18adae2

View File

@ -986,7 +986,7 @@ class AbdmGateway extends BaseController
$pushToGateway = (int) $this->request->getPost('push_to_gateway') === 1;
$now = Time::now('Asia/Kolkata')->toDateTimeString();
$logBridge = function (string $status, array $responsePayload, string $errorMessage = '', string $eventType = 'abdm.opd.prescription.share') use ($opdId, $patientId, $now): void {
$logBridge = function (string $status, array $responsePayload, string $errorMessage = '', string $eventType = 'abdm.opd.prescription.share') use ($opdId, $patientId, $now, $pushToGateway): void {
if (! $this->db->tableExists('abdm_api_logs')) {
return;
}