mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
FIXED: Error where uninitialised Locale field would crash queries. This is noticeable during full text search, when full model fields might not be initialised.
This commit is contained in:
parent
84f5956921
commit
d846a72d39
@ -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