1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 07:06:45 +02:00

Fix compatibility with PHP 8

This commit is contained in:
David Grudl
2020-10-20 21:04:33 +02:00
committed by Jakub Vrana
parent 697eedc6a1
commit 50bb83dbf2
5 changed files with 21 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env php
<?php
error_reporting(6135); // errors and warnings
error_reporting(6133); // errors
include dirname(__FILE__) . "/adminer/include/version.inc.php";
include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";
@@ -233,7 +233,7 @@ function php_shrink($input) {
$short_variables[$key] = short_identifier($number, $chars); // could use also numbers and \x7f-\xff
}
$set = array_flip(preg_split('//', '!"#$%&\'()*+,-./:;<=>?@[\]^`{|}'));
$set = array_flip(preg_split('//', '!"#$%&\'()*+,-./:;<=>?@[]^`{|}'));
$space = '';
$output = '';
$in_echo = false;
@@ -315,6 +315,14 @@ function compile_file($match) {
return '"' . add_quo_slashes($file) . '"';
}
if (!function_exists("each")) {
function each(&$arr) {
$key = key($arr);
next($arr);
return $key === null ? false : array($key, $arr[$key]);
}
}
function min_version() {
return true;
}