function drush_errors_on

8.0.x drush.inc drush_errors_on($errors = null)
6.x drush.inc drush_errors_on($errors = null)
7.x drush.inc drush_errors_on($errors = null)
3.x drush.inc drush_errors_on()
4.x drush.inc drush_errors_on($errors = null)
5.x drush.inc drush_errors_on($errors = null)
master drush.inc drush_errors_on($errors = null)

Turn PHP error handling on.

We default to error_reporting() here just in case drush_errors_on() is called before drush_errors_off() and the context is not yet set.

@arg $errors string The default error level to set in drush. This error level will be carried through further drush_errors_on()/off() calls even if not provided in later calls.

See also

error_reporting()

drush_errors_off()

Related topics

2 calls to drush_errors_on()
update_main_prepare in commands/core/drupal/update_6.inc
update_main_prepare in commands/core/drupal/update_7.inc

File

includes/drush.inc, line 1621
The drush API implementation and helpers.

Code

function drush_errors_on($errors = null) {
  if (!isset($errors)) {
    $errors = error_reporting();
  }
  else {
    drush_set_context('DRUSH_ERROR_REPORTING', $errors);
  }
  error_reporting(drush_get_context('DRUSH_ERROR_REPORTING', $errors));
  ini_set('display_errors', TRUE);
}