Skip to content

Commit

Permalink
Fix an error when trying to resolve an entry from front-end submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed May 15, 2024
1 parent 01044a1 commit 8a87e61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/ElementsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ private function _getEntryFromResponse($response, $siteId)
if ($redirectUrl) {
$urlParams = parse_url($redirectUrl);
$pathParts = explode('/', $urlParams['path']);
$elementId = end($pathParts);
$elementIdSlug = end($pathParts);
$elementId = explode('-', $elementIdSlug)[0] ?? null;
$queryParams = [];

foreach (explode('&', $urlParams['query']) as $urlParam) {
Expand Down

0 comments on commit 8a87e61

Please sign in to comment.