mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1448 from patricknelson/1447-errorpage-write-static-check
FIX for #1447 to ensure proper type-safe checking of file_put_contents() in ErrorPage->writeStaticPage()
This commit is contained in:
commit
9c21bd1d70
@ -250,7 +250,7 @@ class ErrorPage extends Page {
|
||||
// if the page is published in a language other than default language,
|
||||
// write a specific language version of the HTML page
|
||||
$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(
|
||||
'ErrorPage.ERRORFILEPROBLEM',
|
||||
'Error opening file "{filename}" for writing. Please check file permissions.',
|
||||
|
Loading…
Reference in New Issue
Block a user