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
Comment #1
dman commentedYou are absolutely right! My typo.
I just encountered that today also.
The Fix is now in -dev.