From 4bb61e3c53935251b8f0f194946c552f7c9d0349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 21 Aug 2017 14:20:39 +0200 Subject: [PATCH 1/2] Run Selenium tests on PHP 7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should be slightly faster than on 7.0 Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6ca5b44849..89ba7c9084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ after_success: matrix: fast_finish: true include: - - php: "7.0" + - php: "7.2" env: CI_MODE=selenium - php: "7.0" env: CI_MODE=release From 1f02f85b298402939a648984231b06cafb6c389c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 21 Aug 2017 14:24:49 +0200 Subject: [PATCH 2/2] Avoid usage of soon deprecated $php_errormsg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/classes/Config/Validator.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/classes/Config/Validator.php b/libraries/classes/Config/Validator.php index 9949ffb68a..4241422cee 100644 --- a/libraries/classes/Config/Validator.php +++ b/libraries/classes/Config/Validator.php @@ -186,10 +186,14 @@ class Validator return true; } - // static::testPHPErrorMsg(); $error = null; $host = Core::sanitizeMySQLHost($host); + if (function_exists('error_clear_last')) { + /* PHP 7 only code */ + error_clear_last(); + } + if (DatabaseInterface::checkDbExtension('mysqli')) { $socket = empty($socket) ? null : $socket; $port = empty($port) ? null : $port; @@ -215,9 +219,8 @@ class Validator mysqli_close($conn); } } - // static::testPHPErrorMsg(false); - if (isset($php_errormsg)) { - $error .= " - $php_errormsg"; + if (! is_null($error)) { + $error .= ' - ' . error_get_last(); } return is_null($error) ? true : array($error_key => $error); }