r112800 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112799‎ | r112800 | r112801 >
Date:13:11, 1 March 2012
Author:hashar
Status:ok
Tags:
Comment:
Bug 34818 improves regex to capture DB error message

Patch by christian at quelltextlich dot at
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -712,7 +712,7 @@
713713 }
714714 if ( $this->mPHPError ) {
715715 $error = preg_replace( '!\[<a.*</a>\]!', '', $this->mPHPError );
716 - $error = preg_replace( '!^.*?:(.*)$!', '$1', $error );
 716+ $error = preg_replace( '!^.*?:\s?(.*)$!', '$1', $error );
717717 return $error;
718718 } else {
719719 return false;

Status & tagging log