From faec25226aa8a62d5db79d3a0235f7447ac3cea3 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 6 Mar 2014 09:14:03 +0000 Subject: [PATCH 1/2] 'x ?: y' is a new PHP thing? --- core/util.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index a4c5b244..4c6e40f4 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -567,7 +567,7 @@ function getExtension ($mime_type){ $extensions = getMimeType(null, null, true); $ext = array_search($mime_type, $extensions); - return ($ext ?: false); + return ($ext ? $ext : false); } /** From fa5ad5b77da1cb91b7ddf4fc55cbc7b5c1739e08 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 7 Mar 2014 08:27:34 +0000 Subject: [PATCH 2/2] bump the minimum PHP version, the README was updated but not the version check in the code. Fixes #383 --- core/util.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index 4c6e40f4..be33e82d 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -574,9 +574,10 @@ function getExtension ($mime_type){ * @private */ function _version_check() { - if(version_compare(PHP_VERSION, "5.2.6") == -1) { + $min_version = "5.3.0"; + if(version_compare(PHP_VERSION, $min_version) == -1) { print " -Currently SCore Engine doesn't support versions of PHP lower than 5.2.6 -- +Currently SCore Engine doesn't support versions of PHP lower than $min_version -- if your web host is running an older version, they are dangerously out of date and you should plan on moving elsewhere. ";