1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

fix elastic.inc.php to work on PHP 5.2

Without this change, I get the following syntax error on PHP 5.2.6:
PHP Parse error:  syntax error, unexpected ':' in /var/www/adminer/adminer/drivers/elastic.inc.php on line 415

I haven't actually tested the alter_table() method.
This commit is contained in:
helix84
2018-01-26 10:25:33 +01:00
committed by Jakub Vrana
parent 8d0cbb6eb4
commit ef5a76392d
2 changed files with 2 additions and 1 deletions

View File

@@ -412,7 +412,7 @@ if (isset($_GET["elastic"])) {
$properties = array();
foreach($fields as $f) {
$field_name = trim($f[1][0]);
$field_type = trim($f[1][1] ?: "text");
$field_type = trim($f[1][1] ? "" : "text");
$properties[$field_name] = array(
'type' => $field_type
);