Skip to content

Commit

Permalink
Fixed the return type for all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevanzuydam committed May 15, 2024
1 parent b1792ea commit 1e2722f
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 159 deletions.
1 change: 1 addition & 0 deletions Tina4/Database/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ final public function doMigration(): string
restore_error_handler();
error_reporting(0);

//Reads all the sql files into a fileArray
$fileArray = [];
while (false !== ($entry = readdir($dirHandle)) && !$error) {
if ($entry != "." && $entry != ".." && stripos($entry, ".sql")) {
Expand Down
7 changes: 4 additions & 3 deletions Tina4/Tina4Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,11 @@ public function __toString(): string
$content = "";
if ($routerResponse !== null) {
if (!headers_sent()) {
if ($routerResponse->httpCode === HTTP_OK) {
foreach ($routerResponse->headers as $hid => $header) {
header($header);
foreach ($routerResponse->headers as $header) {
if ($routerResponse->httpCode !== HTTP_OK && strpos($header, "FreshToken") !== false) {
continue;
}
header($header);
}
}
http_response_code($routerResponse->httpCode);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
"tina4stack/tina4php-reports": "dev-main",
"tina4stack/tina4-documentation": "dev-main"
}
}
}
Loading

0 comments on commit 1e2722f

Please sign in to comment.