throwException = false; $result = $parser->parse($rawBody, $contentType); if (is_string($result)) { Yii::$app->sentry->captureMessage('Received an empty $result from the parser', [ 'inputText' => $rawBody, 'inputTextLength' => mb_strlen($rawBody), 'outputText' => $result, 'contentType' => $contentType, ], [ 'level' => 'warning', ]); return []; } if (!empty($result)) { return $result; } mb_parse_str($rawBody, $bodyParams); if (!empty($bodyParams)) { return $bodyParams; } return []; } }