From: Antoine Musso Date: Thu, 1 Mar 2012 13:11:25 +0000 (+0000) Subject: Bug 34818 improves regex to capture DB error message X-Git-Tag: 1.31.0-rc.0~24448 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=ba07c37ea0c7d303a45cdaf77050d5b4cbd0ab8e;p=lhc%2Fweb%2Fwiklou.git Bug 34818 improves regex to capture DB error message Patch by christian at quelltextlich dot at --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 8c97bb595c..5e277f62e6 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -712,7 +712,7 @@ abstract class DatabaseBase implements DatabaseType { } if ( $this->mPHPError ) { $error = preg_replace( '!\[\]!', '', $this->mPHPError ); - $error = preg_replace( '!^.*?:(.*)$!', '$1', $error ); + $error = preg_replace( '!^.*?:\s?(.*)$!', '$1', $error ); return $error; } else { return false;