From 8e78dbad691f4a3eadedd8b2884dae26c5a876a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Dec 2019 16:41:22 +0100 Subject: [PATCH] Fix for php 7.4 --- .travis.yml | 4 ++++ htdocs/core/lib/functions2.lib.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c365e3ce00..5193b7c2c77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,8 @@ matrix: env: DB=mariadb - php: '7.2' env: DB=mariadb + - php: '7.3' + env: DB=mariadb - php: '5.6' env: DB=postgresql - php: '7.0' @@ -76,6 +78,8 @@ matrix: env: DB=postgresql - php: '7.2' env: DB=postgresql + - php: '7.3' + env: DB=postgresql - php: nightly env: DB=postgresql diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 0356ecc8b23..cc6fb31c1de 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1347,7 +1347,7 @@ function hexbin($hexa) $strLength = dol_strlen($hexa); for ($i = 0; $i < $strLength; $i++) { - $bin .= str_pad(decbin(hexdec($hexa{$i})), 4, '0', STR_PAD_LEFT); + $bin .= str_pad(decbin(hexdec($hexa[$i])), 4, '0', STR_PAD_LEFT); } return $bin; }