Commit 339db5a3 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

#408810 - site migration fails on head. This takes into account the new error...

#408810 - site migration fails on head. This takes into account the new error logging changes in drush to solve this problem.
parent 161eef00
......@@ -272,9 +272,13 @@ function update_create_batch_table() {
function update_main() {
// Minimum load of components.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
// Some unavoidable errors happen because the database is not yet up-to-date.
// Our custom error handler is not yet installed, so we just suppress them.
_provision_errors_off();
require_once './includes/bootstrap.inc';
// Minimum load of components.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
require_once './includes/install.inc';
require_once './includes/file.inc';
require_once './modules/system/system.install';
......@@ -306,7 +310,7 @@ function update_main() {
// Turn error reporting back on. From now on, only fatal errors (which are
// not passed through the error handler) will cause a message to be printed.
ini_set('display_errors', TRUE);
_provision_errors_on();
......
......@@ -399,14 +399,16 @@ function provision_platform_include($path, $command, $version = null, $platform
}
function _provision_errors_on() {
ini_set('error_reporting', E_ALL ^ E_NOTICE);
$errors =& drush_get_context('DRUPAL_ERROR_REPORTING', E_ALL ^ E_NOTICE);
$errors = error_reporting($errors);
ini_set('display_errors', TRUE);
}
_provision_errors_on();
function _provision_errors_off() {
ini_set('error_reporting', ~E_ALL);
$errors =& drush_get_context('DRUPAL_ERROR_REPORTING', 0);
$errors = error_reporting(0);
ini_set('display_errors', FALSE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment