mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX TinyMCEConfig image size presets handle incorrect values
This commit is contained in:
parent
ce3e642b12
commit
034bace213
@ -16,7 +16,7 @@ SilverStripe\Core\Injector\Injector:
|
||||
|
||||
SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
|
||||
image_size_presets:
|
||||
- width: 600,
|
||||
- width: 600
|
||||
i18n: SilverStripe\Forms\HTMLEditor\TinyMCEConfig.BEST_FIT
|
||||
text: Best fit
|
||||
name: bestfit
|
||||
|
@ -694,6 +694,10 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
}
|
||||
|
||||
foreach ($settings['image_size_presets'] as &$preset) {
|
||||
if (isset($preset['width'])) {
|
||||
$preset['width'] = (int) $preset['width'];
|
||||
}
|
||||
|
||||
if (isset($preset['i18n'])) {
|
||||
$preset['text'] = _t(
|
||||
$preset['i18n'],
|
||||
|
Loading…
Reference in New Issue
Block a user