mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
FIX Clear Requirements before in-memory HTTP request for ErrorPage
For example, avoids issues where separate controllers (calling and called) operate on the same set of files through Requirements::combine_files().
This commit is contained in:
parent
b19a82b693
commit
23eeb99075
@ -39,6 +39,8 @@ class ErrorPage extends Page {
|
|||||||
static public function response_for($statusCode) {
|
static public function response_for($statusCode) {
|
||||||
// first attempt to dynamically generate the error page
|
// first attempt to dynamically generate the error page
|
||||||
if($errorPage = DataObject::get_one('ErrorPage', "\"ErrorCode\" = $statusCode")) {
|
if($errorPage = DataObject::get_one('ErrorPage', "\"ErrorCode\" = $statusCode")) {
|
||||||
|
Requirements::clear();
|
||||||
|
Requirements::clear_combined_files();
|
||||||
return ModelAsController::controller_for($errorPage)->handleRequest(new SS_HTTPRequest('GET', ''), DataModel::inst());
|
return ModelAsController::controller_for($errorPage)->handleRequest(new SS_HTTPRequest('GET', ''), DataModel::inst());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user