Skip to content

return self::UPDATE_ERROR; does not seem to work in updateSteps #33

@grandeljay

Description

@grandeljay

Code I am using

protected function updateSteps(): int
{
    if (version_compare($this->getVersion(), self::VERSION, '<')) {
        $update_successful = false;

        switch (self::VERSION) {
            case '0.3.0':
                $update_query = xtc_db_query([...]);

                $update_successful = false !== $update_query;
                break;
        }

        if ($update_successful) {
            $this->setVersion(self::VERSION);

            return self::UPDATE_SUCCESS;
        }

        return self::UPDATE_ERROR;
    }

    return self::UPDATE_NOTHING;
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions