mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Checking for array existence before iterating through DataObjectDecorator->provideI18nEntities()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65063 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5c4403d57e
commit
b5b11842f9
@ -155,10 +155,10 @@ abstract class DataObjectDecorator extends Extension implements i18nEntityProvid
|
||||
$entities = array();
|
||||
$fields = $this->extraDBFields();
|
||||
$translatableAttributes = array('db','has_one','has_many','many_many');
|
||||
foreach($fields as $att => $spec) {
|
||||
if($fields) foreach($fields as $att => $spec) {
|
||||
if(!in_array($att, $translatableAttributes)) continue;
|
||||
|
||||
foreach($spec as $name => $type) {
|
||||
if($spec) foreach($spec as $name => $type) {
|
||||
$entities["{$this->class}.{$att}_{$name}"] = array($name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user