From ef5a76392dc1bdd7cac9d7af0fd9e025dea3ed3a Mon Sep 17 00:00:00 2001 From: helix84 Date: Fri, 26 Jan 2018 10:25:33 +0100 Subject: [PATCH] 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. --- adminer/drivers/elastic.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 00a6e525..cdd5e466 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -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 ); diff --git a/changes.txt b/changes.txt index e566f34b..e9d56571 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.5.1-dev: Fix counting selected rows after going back to select page +PHP <5.3 compatibility even with Elasticsearch enabled Adminer 4.5.0 (released 2018-01-24): Display name of the object in confirmation when dropping it