DatabaseBase::tableName() fix limit while invoking explode()
authorSergio Santoro <santoro.srg@gmail.com>
Wed, 15 Oct 2014 21:14:11 +0000 (23:14 +0200)
committerSergio Santoro <santoro.srg@gmail.com>
Wed, 15 Oct 2014 21:14:11 +0000 (23:14 +0200)
Limit for explode() needs to be set to 3 to allow entering
branch at line 2350.

Change-Id: Idc2ba81a4bafa3e5511982db73a5c1549f1f9ef0

includes/db/Database.php

index 29642d0..4bb646e 100644 (file)
@@ -2346,7 +2346,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType {
                # Split database and table into proper variables.
                # We reverse the explode so that database.table and table both output
                # the correct table.
-               $dbDetails = explode( '.', $name, 2 );
+               $dbDetails = explode( '.', $name, 3 );
                if ( count( $dbDetails ) == 3 ) {
                        list( $database, $schema, $table ) = $dbDetails;
                        # We don't want any prefix added in this case