search($search); // Ergebnisse werden in ein flaches array umgewandelt, da sont incomplete-PHP error im Ergebnis $safeArrayResults = []; foreach ($results as $obj) { $safeArrayResults[] = [ "id" => $obj->id, "title" => $obj->title, "content" => $obj->content, "author" => $obj->author, "category" => $obj->category, "tags" => $obj->tags, "creationDate" => $obj->creationDate ]; } $_SESSION["search_results"] = $safeArrayResults; $_SESSION["search_query"] = $search; $_SESSION["message"] = "new_search_results"; } catch (Exception $e){ $_SESSION["message"] = "internal_error"; } } header("Location: ../../index.php?pfad=search-results"); exit(); } ?>