From 73ab27937e13646a3ee04c5c4cd1ceac0049be6b Mon Sep 17 00:00:00 2001 From: Casey Schneberger Date: Fri, 29 Oct 2021 13:47:33 -0500 Subject: [PATCH] PHP 8.0 compatibility change, braces to brackets --- src/filters/FilterASCIIHex.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filters/FilterASCIIHex.php b/src/filters/FilterASCIIHex.php index abad13a..86be63e 100644 --- a/src/filters/FilterASCIIHex.php +++ b/src/filters/FilterASCIIHex.php @@ -16,7 +16,7 @@ class FilterASCIIHex { *@internal same as _hex2bin ($hexString) *@access public *@note Function was written because PHP has a bin2hex, but not a hex2bin! - *@internal note pack(“C”,hexdec(substr($data,$i,2))) DOES NOT WORK + *@internal note pack(ā€œCā€,hexdec(substr($data,$i,2))) DOES NOT WORK * **/ function decode($data) { @@ -54,7 +54,7 @@ function encode($data) { $hex = ""; $i = 0; do { - $hex .= sprintf("%02x", ord($str{$i})); + $hex .= sprintf("%02x", ord($str[$i])); $i++; } while ($i < strlen($str)); return $hex; @@ -62,4 +62,4 @@ function encode($data) { } -?> \ No newline at end of file +?>