function imagecache_actions_validate_number(&$element, &$form_state) {
dpm(array('imagecache_actions_validate_number' => $element, 'form_state' => $form_state, 'results' => empty($element['#value']) ? $element['#value'] : 0 ));
if(empty($element['#value'])) form_set_value($element, 0, $form_state);
}

This code in imagecache_actions/utility.inc ....

function imagecache_actions_validate_number(&$element, &$form_state) {                                        
  if(empty($element['value'])) form_set_value($element, 0, $form_state);                                      
} 

.... needs to be changed to:

function imagecache_actions_validate_number(&$element, &$form_state) {                                        
  if(empty($element['#value'])) form_set_value($element, 0, $form_state);                                      
} 

Otherwise since $element['value'] is incorrect and always empty, it will always save 0 and mess everything up.

How to test
You can test this by adding a "Underlay" preset and trying to apply ypos: center and xpost: center. Save the form and you'll get 0.

Comments

dman’s picture

Status: Reviewed & tested by the community » Fixed

You are absolutely right! My typo.
I just encountered that today also.

The Fix is now in -dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.