protected function validateImagesStore()
    {
        if ($this->isError()) {
            return null;
        }

        $error = false;

        foreach (array('logo', 'favicon') as $field) {

            if ($this->getSubmitted("delete_$field")) {
                $this->setSubmitted("data.$field", '');
            }

            $file = $this->request->file($field);

            if (empty($file)) {
                continue;
            }

            $result = $this->file_transfer->upload($file, null, 'image/upload/store');

            if ($result !== true) {
                $error = true;
                $this->setError($field, (string) $result);
                continue;
            }

            $this->setSubmitted("data.$field", $this->file_transfer->getTransferred(true));
        }

        return empty($error);
    }