Back to ChangeSet class

Method check

public array
check
()
Checks the database and returns an array of any errors found.
Returns
  • array Array of errors if any.
Since
  • 2.5
Class: ChangeSet
Project: Joomla

Method check - Source code

/**
 * Checks the database and returns an array of any errors found.
 * Note these are not database errors but rather situations where
 * the current schema is not up to date.
 *
 * @return   array Array of errors if any.
 *
 * @since    2.5
 */
public function check()
{
    $errors = array();
    foreach ($this->changeItems as $item) {
        if ($item->check() === -2) {
            // Error found
            $errors[] = $item;
        }
    }
    return $errors;
}