From 5dc266d98017c3767cbfa08134dd9fcf143fa50b Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 20 Aug 2014 22:03:32 +0100 Subject: [PATCH] MDL-46918 ddl: fix error when renaming table already exists --- lib/ddl/database_manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ddl/database_manager.php b/lib/ddl/database_manager.php index eb940766699..a909f337209 100644 --- a/lib/ddl/database_manager.php +++ b/lib/ddl/database_manager.php @@ -497,7 +497,7 @@ class database_manager { // Check new table doesn't exist if ($this->table_exists($check)) { - throw new ddl_exception('ddltablealreadyexists', $xmldb_table->getName(), 'can not rename table'); + throw new ddl_exception('ddltablealreadyexists', $check->getName(), 'can not rename table'); } if (!$sqlarr = $this->generator->getRenameTableSQL($xmldb_table, $newname)) {