From b11abb540f237c040e9ab00dd90b752b54dc64a2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 3 Oct 2015 16:36:55 -0700 Subject: [PATCH] Fix DatabaseMysqlBase.php IDEA errors * Declare base mysqlRealEscapeString() * Fix MySQLField::tableName() return value Change-Id: I1277166e741e69cb1c045b3baa6ed8de664e9255 --- includes/db/DatabaseMysqlBase.php | 8 +++++++- tests/phpunit/includes/db/DatabaseMysqlBaseTest.php | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index ac7ce1086b..d2ccbf45a0 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -572,6 +572,12 @@ abstract class DatabaseMysqlBase extends DatabaseBase { return $sQuoted; } + /** + * @param string $s + * @return mixed + */ + abstract protected function mysqlRealEscapeString( $s ); + /** * MySQL uses `backticks` for identifier quoting instead of the sql standard "double quotes". * @@ -1250,7 +1256,7 @@ class MySQLField implements Field { * @return string */ function tableName() { - return $this->tableName; + return $this->tablename; } /** diff --git a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php index 42ea58e551..8c09471285 100644 --- a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php +++ b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php @@ -79,6 +79,10 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase { protected function mysqlPing() { } + protected function mysqlRealEscapeString( $s ) { + + } + // From interface DatabaseType function insertId() { } -- 2.20.1