Merge branch '1.2' into 1.3

This commit is contained in:
Robbie Averill 2019-07-23 12:20:39 +02:00
commit 4c5656a243
2 changed files with 7 additions and 2 deletions

5
_config.php Normal file → Executable file
View File

@ -19,3 +19,8 @@
// EnvironmentCheckSuite::register('check', 'FileWriteableCheck("assets")', "Is assets/ writeable?");
// EnvironmentCheckSuite::register('check', 'FileWriteableCheck("' . TEMP_FOLDER . '")', "Is the temp folder writeable?");
// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
if (!class_exists('SS_Object')) {
class_alias('Object', 'SS_Object');
}

4
code/EnvironmentCheckSuite.php Normal file → Executable file
View File

@ -19,7 +19,7 @@
*
* $result = EnvironmentCheckSuite::inst('health')->run();
*/
class EnvironmentCheckSuite extends Object
class EnvironmentCheckSuite extends SS_Object
{
/**
* Name of this suite.
@ -121,7 +121,7 @@ class EnvironmentCheckSuite extends Object
foreach ($this->checks as $check) {
list($checkClass, $checkTitle) = $check;
if (is_string($checkClass)) {
$checkInst = Object::create_from_string($checkClass);
$checkInst = SS_Object::create_from_string($checkClass);
if ($checkInst instanceof EnvironmentCheck) {
$output[] = array($checkInst, $checkTitle);
} else {