Issue #2890514 by quietone, vomitHatSteve, heddn: upgrade_d6_imagecache_presets fails if blank "action" is enountered
parent
bb3791d9de
commit
820c3d83a3
|
|
@ -20,6 +20,9 @@ class ImageCacheActions extends ProcessPluginBase {
|
||||||
$effects = [];
|
$effects = [];
|
||||||
|
|
||||||
foreach ($row->getSourceProperty('actions') as $action) {
|
foreach ($row->getSourceProperty('actions') as $action) {
|
||||||
|
if (empty($action['action'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$id = preg_replace('/^imagecache/', 'image', $action['action']);
|
$id = preg_replace('/^imagecache/', 'image', $action['action']);
|
||||||
|
|
||||||
if ($id === 'image_crop') {
|
if ($id === 'image_crop') {
|
||||||
|
|
|
||||||
|
|
@ -10645,6 +10645,14 @@ $connection->insert('imagecache_action')
|
||||||
'action' => 'imagecache_rotate',
|
'action' => 'imagecache_rotate',
|
||||||
'data' => 'a:3:{s:7:"degrees";s:2:"55";s:6:"random";i:0;s:7:"bgcolor";s:0:"";}',
|
'data' => 'a:3:{s:7:"degrees";s:2:"55";s:6:"random";i:0;s:7:"bgcolor";s:0:"";}',
|
||||||
))
|
))
|
||||||
|
->values(array(
|
||||||
|
'actionid' => '7',
|
||||||
|
'presetid' => '2',
|
||||||
|
'weight' => '0',
|
||||||
|
'module' => 'imagecache',
|
||||||
|
'action' => '',
|
||||||
|
'data' => 'a:3:{s:7:"degrees";s:2:"55";s:6:"random";i:0;s:7:"bgcolor";s:0:"";}',
|
||||||
|
))
|
||||||
->execute();
|
->execute();
|
||||||
$connection->schema()->createTable('imagecache_preset', array(
|
$connection->schema()->createTable('imagecache_preset', array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue