Support PHP 7
This commit is contained in:
parent
763d3e9f89
commit
b317fe156a
|
@ -13,16 +13,16 @@ if (!defined("DRIVER")) {
|
|||
parent::init();
|
||||
}
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
|
||||
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
|
||||
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
|
||||
$return = @$this->real_connect(
|
||||
($server != "" ? $host : ini_get("mysqli.default_host")),
|
||||
($server . $username != "" ? $username : ini_get("mysqli.default_user")),
|
||||
($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")),
|
||||
null,
|
||||
$database,
|
||||
(is_numeric($port) ? $port : ini_get("mysqli.default_port")),
|
||||
(!is_numeric($port) ? $port : null)
|
||||
(!is_numeric($port) ? $port : $socket)
|
||||
);
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
$VERSION = "4.2.3";
|
||||
$VERSION = "4.2.4-dev";
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
Adminer 4.2.4-dev:
|
||||
MySQL: Support PHP 7
|
||||
|
||||
Adminer 4.2.3 (released 2015-11-15):
|
||||
Fix XSS in indexes (non-MySQL only)
|
||||
Support PHP 7
|
||||
|
|
Loading…
Reference in a new issue