public function checkFields(&$errors, $checkForDuplicates = true) { if (strlen($this->get('max_width')) > 0 && !is_numeric($this->get('max_width'))) { $errors['max_width'] = __('Must be a number.'); } if (strlen($this->get('max_height')) > 0 && !is_numeric($this->get('max_height'))) { $errors['max_height'] = __('Must be a number.'); } parent::checkFields($errors, $checkForDuplicates); }
public function checkFields(array &$errors, $checkForDuplicates = true) { if (!is_dir(DOCROOT . $this->get('destination') . '/')) { $errors['destination'] = __('The destination directory, %s, does not exist.', array('<code>' . $this->get('destination') . '</code>')); } elseif (!is_writable(DOCROOT . $this->get('destination') . '/')) { $errors['destination'] = __('The destination directory is not writable.') . ' ' . __('Please check permissions on %s.', array('<code>' . $this->get('destination') . '</code>')); } parent::checkFields($errors, $checkForDuplicates); }