mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX for #1447 to ensure proper type-safe checking of file_put_contents() in ErrorPage->writeStaticPage()
This commit is contained in:
parent
859fd5562f
commit
000bf09354
@ -250,7 +250,7 @@ class ErrorPage extends Page {
|
|||||||
// if the page is published in a language other than default language,
|
// if the page is published in a language other than default language,
|
||||||
// write a specific language version of the HTML page
|
// write a specific language version of the HTML page
|
||||||
$filePath = self::get_filepath_for_errorcode($this->ErrorCode, $this->Locale);
|
$filePath = self::get_filepath_for_errorcode($this->ErrorCode, $this->Locale);
|
||||||
if (!file_put_contents($filePath, $errorContent)) {
|
if (file_put_contents($filePath, $errorContent) === false) {
|
||||||
$fileErrorText = _t(
|
$fileErrorText = _t(
|
||||||
'ErrorPage.ERRORFILEPROBLEM',
|
'ErrorPage.ERRORFILEPROBLEM',
|
||||||
'Error opening file "{filename}" for writing. Please check file permissions.',
|
'Error opening file "{filename}" for writing. Please check file permissions.',
|
||||||
|
Loading…
Reference in New Issue
Block a user