mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Merge pull request #39 from tractorcow/3.0-fatal-fixes
FIXED: Error where uninitialised Locale field would crash queries.
This commit is contained in:
commit
8b923ca84a
@ -539,7 +539,7 @@ class Translatable extends DataExtension implements PermissionProvider {
|
||||
// If the record is saved (and not a singleton), and has a locale,
|
||||
// limit the current call to its locale. This fixes a lot of problems
|
||||
// with other extensions like Versioned
|
||||
$locale = ($this->owner->ID && $this->owner->Locale) ? $this->owner->Locale : Translatable::get_current_locale();
|
||||
$locale = ($this->owner->ID && !empty($this->owner->Locale)) ? $this->owner->Locale : Translatable::get_current_locale();
|
||||
$baseTable = ClassInfo::baseDataClass($this->owner->class);
|
||||
if(
|
||||
$locale
|
||||
|
Loading…
Reference in New Issue
Block a user