Merge branch '1.3' into 1

This commit is contained in:
Robbie Averill 2019-07-23 15:57:47 +02:00
commit 47c5a7ac62
3 changed files with 15 additions and 18 deletions

View File

@ -1,24 +1,21 @@
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
sudo: false
dist: trusty
language: php
php:
- 5.4
- 5.5
env:
- DB=MYSQL CORE_RELEASE=3.5
matrix:
include:
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.4
- php: 7.1
- php: '5.6'
env: DB=MYSQL CORE_RELEASE=3.6
- php: '7.0'
env: DB=PGSQL CORE_RELEASE=3.7
- php: '7.1'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.2'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.3'
env: DB=MYSQL CORE_RELEASE=3.7
before_script:
- composer self-update || true

View File

@ -42,17 +42,17 @@ class WidgetAreaEditor extends FormField
$widgets= new ArrayList();
foreach ($this->widgetClasses as $widgetClass) {
$classes = ClassInfo::subclassesFor($widgetClass);
$classes = ClassInfo::subclassesFor($widgetClass) ?: array();
if (isset($classes['Widget'])) {
unset($classes['Widget']);
} elseif (isset($classes[0]) && $classes[0] == 'Widget') {
unset($classes[0]);
}
foreach ($classes as $class) {
$available = Config::inst()->get($class, 'only_available_in');
if (!empty($available) && is_array($available)) {
if (in_array($this->Name, $available)) {
$widgets->push(singleton($class));
@ -62,7 +62,7 @@ class WidgetAreaEditor extends FormField
}
}
}
return $widgets;
}

View File

@ -14,7 +14,7 @@
"silverstripe/cms": "^3.2"
},
"require-dev": {
"phpunit/PHPUnit": "~3.7@stable"
"phpunit/phpunit": "^5.7"
},
"extra": {
"branch-alias": {