mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Merge branch '1.3' into 1
This commit is contained in:
commit
47c5a7ac62
23
.travis.yml
23
.travis.yml
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
"silverstripe/cms": "^3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/PHPUnit": "~3.7@stable"
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
Loading…
Reference in New Issue
Block a user