Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/classes/DatabaseInterface.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php
index 7df2397651..df74bdbe13 100644
--- a/libraries/classes/DatabaseInterface.php
+++ b/libraries/classes/DatabaseInterface.php
@@ -22,6 +22,7 @@ use PhpMyAdmin\Query\Generator as QueryGenerator;
use PhpMyAdmin\Query\Utilities;
use PhpMyAdmin\SqlParser\Context;
use PhpMyAdmin\Utils\SessionCache;
+use RuntimeException;
use function __;
use function array_column;
@@ -2246,6 +2247,15 @@ class DatabaseInterface implements DbalInterface
return $this->versionInt;
}
+ public function setVersion(int $version): void
+ {
+ if (! defined('TESTSUITE')) {
+ throw new RuntimeException('This method should only be executed in a testing environment.');
+ }
+
+ $this->versionInt = $version;
+ }
+
/**
* Server version
*/