/**
* 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;
}