summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--imagecache_ui.pages.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/imagecache_ui.pages.inc b/imagecache_ui.pages.inc
index 744bc16..b6a5066 100644
--- a/imagecache_ui.pages.inc
+++ b/imagecache_ui.pages.inc
@@ -135,12 +135,12 @@ function imagecache_ui_preset_form($form_state, $preset = array()) {
$form['presetid'] = array(
'#type' => 'value',
- '#value' => $preset['presetid'],
+ '#value' => isset($preset['presetid']) ? $preset['presetid'] : '',
);
// Browsers don't submit disabled form values so we've got to put two copies
// of the name on the form: one for the submit handler and one for the user.
- if ($preset['storage'] === IMAGECACHE_STORAGE_DEFAULT) {
+ if (isset($preset['storage']) && $preset['storage'] === IMAGECACHE_STORAGE_DEFAULT) {
$form['presetname'] = array(
'#type' => 'value',
'#value' => $preset['presetname'],
@@ -158,7 +158,7 @@ function imagecache_ui_preset_form($form_state, $preset = array()) {
'#type' => 'textfield',
'#size' => '64',
'#title' => t('Preset Namespace'),
- '#default_value' => $preset['presetname'],
+ '#default_value' => isset($preset['presetname']) ? $preset['presetname'] : '',
'#description' => t('The namespace is used in URL\'s for images to tell imagecache how to process an image. Please only use alphanumeric characters, underscores (_), and hyphens (-) for preset names.'),
'#validate' => array('imagecache_element_presetname_validate' => array()),
);
@@ -166,7 +166,7 @@ function imagecache_ui_preset_form($form_state, $preset = array()) {
$form['submit'] = array(
'#type' => 'submit',
- '#value' => $preset['storage'] === IMAGECACHE_STORAGE_DEFAULT ? t('Override Defaults') : t('Save Preset'),
+ '#value' => isset($preset['storage']) && $preset['storage'] === IMAGECACHE_STORAGE_DEFAULT ? t('Override Defaults') : t('Save Preset'),
'#weight' => 9,
);
@@ -391,7 +391,7 @@ function imagecache_ui_action_form($form_state, $preset, $action) {
);
$form['actionid'] = array(
'#type' => 'value',
- '#value' => $action['actionid'],
+ '#value' => isset($action['actionid']) ? $action['actionid']: '',
);
$form['action'] = array(
'#type' => 'value',