Move dependency-less Page->exit to Core\System::echoResponse

- The method doesn't actually exit
- Fix a bug with header handling in System::echoResponse with numerical key header strings
  - Adding a full-string header with ICanCreateResponses->setHeader was resulting in a wrong header named after the numerical key
This commit is contained in:
Hypolite Petovan 2023-09-21 09:17:38 -04:00
parent dd7bea4bd1
commit 94e3dde2e3
5 changed files with 38 additions and 37 deletions

View file

@ -150,7 +150,7 @@ class Upload extends \Friendica\BaseModule
$this->response->addContent($message);
}
$this->page->exit($this->response->generate());
System::echoResponse($this->response->generate());
System::exit();
}
}

View file

@ -207,7 +207,7 @@ class Upload extends \Friendica\BaseModule
$this->response->addContent($message);
}
$this->page->exit($this->response->generate());
System::echoResponse($this->response->generate());
System::exit();
}
}