1 install.core.inc install_verify_completed_task()

Verifies and returns the last installation task that was completed.

Return value

string|NULL: The last completed task, if there is one. An exception is thrown if Backdrop is already installed.




core/includes/install.core.inc, line 861
API functions for installing Backdrop.


function install_verify_completed_task() {
  try {
    if ($result = db_query("SELECT value FROM {state} WHERE name = :name", array('name' => 'install_task'))) {
      $task = unserialize($result->fetchField());
  // Do not trigger an error if the database query fails, since the database
  // might not be set up yet.
  catch (Exception $e) {
  if (isset($task)) {
    if ($task == 'done') {
      throw new Exception(install_already_done_error());
    return $task;

  // No install task found.
  return NULL;