The array and string offset access syntax using curly braces is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-07-21 21:19:15 +02:00
parent d15ad1b5af
commit 1b0f30b1ab
No known key found for this signature in database
GPG key ID: 36E3664E099D0614

View file

@ -111,7 +111,7 @@ class Util {
public function hexToRGB($color) { public function hexToRGB($color) {
$hex = preg_replace("/[^0-9A-Fa-f]/", '', $color); $hex = preg_replace("/[^0-9A-Fa-f]/", '', $color);
if (strlen($hex) === 3) { if (strlen($hex) === 3) {
$hex = $hex{0} . $hex{0} . $hex{1} . $hex{1} . $hex{2} . $hex{2}; $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
} }
if (strlen($hex) !== 6) { if (strlen($hex) !== 6) {
return 0; return 0;