Merge "RCFilters: Fix highlight circle misalignment"
[lhc/web/wiklou.git] / includes / libs / rdbms / exception / DBQueryError.php
index ac9217d..6a4076f 100644 (file)
  * @ingroup Database
  */
 
+namespace Wikimedia\Rdbms;
+
 /**
  * @ingroup Database
  */
 class DBQueryError extends DBExpectedError {
        /** @var string */
        public $error;
-       /** @var integer */
+       /** @var int */
        public $errno;
        /** @var string */
        public $sql;
@@ -40,7 +42,7 @@ class DBQueryError extends DBExpectedError {
         * @param string $fname
         */
        function __construct( IDatabase $db, $error, $errno, $sql, $fname ) {
-               if ( $db instanceof DatabaseBase && $db->wasConnectionError( $errno ) ) {
+               if ( $db instanceof Database && $db->wasConnectionError( $errno ) ) {
                        $message = "A connection error occured. \n" .
                                "Query: $sql\n" .
                                "Function: $fname\n" .
@@ -61,3 +63,5 @@ class DBQueryError extends DBExpectedError {
                $this->fname = $fname;
        }
 }
+
+class_alias( DBQueryError::class, 'DBQueryError' );