Skip to content

Commit

Permalink
Consider deprecation error messages as warnings instead of errors (#4565
Browse files Browse the repository at this point in the history
)
  • Loading branch information
davialexandre committed Feb 17, 2021
1 parent 0d48886 commit 8764fc4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,9 @@ function _drush_log_drupal_messages() {
// This is a special case. PHP logs sql errors as 'User Warnings', not errors.
drush_set_error('DRUSH_DRUPAL_ERROR_MESSAGE', preg_replace('/^user warning: /i', '', $error));
}
elseif (preg_match('/^deprecated function:/i', $error)) {
drush_log(preg_replace('/^deprecated function: /i', '', $error), LogLevel::WARNING);
}
else {
drush_set_error('DRUSH_DRUPAL_ERROR_MESSAGE', $error);
}
Expand Down

0 comments on commit 8764fc4

Please sign in to comment.