diff --git a/CHANGELOG.md b/CHANGELOG.md
index 297546a72..955f336ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@
 ### Changed
 
 ### Fixed
+* Crawler could not index frontend because of trustedHostPattern mismatch
+* Fatal PHP error is thrown in the backend crawler log
 
 ### Deprecated
 #### Classes
diff --git a/Classes/Backend/RequestForm/LogRequestForm.php b/Classes/Backend/RequestForm/LogRequestForm.php
index a4bbadbdb..ea9845209 100644
--- a/Classes/Backend/RequestForm/LogRequestForm.php
+++ b/Classes/Backend/RequestForm/LogRequestForm.php
@@ -370,7 +370,7 @@ private function drawLog_addRows(array $logEntriesOfPage, string $titleString):
                     $rowData['exec_time'] = $execTime;
                 }
                 $rowData['result_status'] = GeneralUtility::fixed_lgd_cs($resStatus, 50);
-                $url = htmlspecialchars($parameters['url'] ?? $parameters['alturl'], ENT_QUOTES | ENT_HTML5);
+                $url = htmlspecialchars((string) ($parameters['url'] ?? $parameters['alturl']), ENT_QUOTES | ENT_HTML5);
                 $rowData['url'] = '<a href="' . $url . '" target="_newWIndow">' . $url . '</a>';
                 $rowData['feUserGroupList'] = $parameters['feUserGroupList'] ?? '';
                 $rowData['procInstructions'] = is_array($parameters['procInstructions']) ? implode('; ', $parameters['procInstructions']) : '';
diff --git a/cli/bootstrap.php b/cli/bootstrap.php
index 524f8b52e..d9a65b50c 100644
--- a/cli/bootstrap.php
+++ b/cli/bootstrap.php
@@ -66,6 +66,13 @@
 $_SERVER['QUERY_STRING'] = (isset($urlParts['query']) ? $urlParts['query'] : '');
 $_SERVER['REQUEST_URI'] = $urlParts['path'] . (isset($urlParts['query']) ? '?' . $urlParts['query'] : '');
 $_SERVER['REQUEST_METHOD'] = 'GET';
+$_SERVER['SERVER_PORT'] = '80';
+
+    // Define HTTPS disposal:
+if ($urlParts['scheme'] === 'https') {
+    $_SERVER['HTTPS'] = 'on';
+    $_SERVER['SERVER_PORT'] = '443';
+}
 
     // Define a port if used in the URL:
 if (isset($urlParts['port'])) {
@@ -73,11 +80,6 @@
     $_SERVER['SERVER_PORT'] = (string)$urlParts['port'];
 }
 
-    // Define HTTPS disposal:
-if ($urlParts['scheme'] === 'https') {
-    $_SERVER['HTTPS'] = 'on';
-}
-
 chdir($typo3Root);
 include($typo3Root . '/index.php');