diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 5ba4aa52de5..f0b969f7bdd 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1011,11 +1011,11 @@ function install_settings_form_submit($form, &$form_state) { if (!file_prepare_directory($config_path, FILE_CREATE_DIRECTORY)) { // How best to handle errors here? }; - + // Write out a .htaccess file that will protect the config directory from // prying eyes. file_save_htaccess($config_path, TRUE); - + // Indicate that the settings file has been verified, and check the database // for the last completed task, now that we have a valid connection. This // last step is important since we want to trigger an error if the new diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc index 18224953853..0a8f105c407 100644 --- a/core/modules/image/image.admin.inc +++ b/core/modules/image/image.admin.inc @@ -146,7 +146,7 @@ function image_style_form_add_submit($form, &$form_state) { $style = $form_state['image_style']; // Check if this field has any configuration options. $effect = image_effect_definition_load($form_state['values']['new']); - + // Load the configuration form for this option. if (isset($effect['form callback'])) { $path = 'admin/config/media/image-styles/edit/' . $form_state['image_style']['name'] . '/add/' . $form_state['values']['new']; diff --git a/core/modules/image/image.module b/core/modules/image/image.module index cc9fbb0c26c..2b043ac4126 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -477,7 +477,7 @@ function image_styles() { */ function image_style_load($name) { $style = config('image.styles.' . $name)->get(); - + // @todo Requires a more reliable + generic method to check for whether the // configuration object exists. if (!isset($style['name'])) { @@ -987,7 +987,7 @@ function image_effect_load($ieid, $style_name) { function image_effect_save($style_name, $effect) { $config = config('image.styles.' . $style_name); - if (empty($effect['ieid'])) { + if (!isset($effect['ieid']) || empty($effect['ieid'])) { // We need to generate the ieid and save the new effect. // The machine name is all the elements of the data array concatenated // together, delimited by underscores. diff --git a/core/modules/image/image.test b/core/modules/image/image.test index 7a4683b6456..e2b4fd84420 100644 --- a/core/modules/image/image.test +++ b/core/modules/image/image.test @@ -414,7 +414,7 @@ class ImageAdminStylesUnitTest extends ImageFieldTestCase { // Revisit each form to make sure the effect was saved. drupal_static_reset('image_styles'); $style = image_style_load($style_name); - + foreach ($style['effects'] as $ieid => $effect) { $this->drupalGet($style_path . '/effects/' . $ieid); foreach ($effect_edits[$effect['name']] as $field => $value) {