Skip to content

Commit 608ed22

Browse files
committed
Merge remote-tracking branch 'joomla/master' into 2.0-dev
# Conflicts: # .drone.jsonnet # .drone.yml # README.md # src/String.php
2 parents 20d3216 + 21269bf commit 608ed22

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: joomla
2+
custom: https://community.joomla.org/sponsorship-campaigns.html

src/phputf8/utils/bad.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ function utf8_bad_replace($str, $replace = '?') {
226226
/**
227227
* Reports on the type of bad byte found in a UTF-8 string. Returns a
228228
* status code on the first bad byte found
229+
*
230+
* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result this function has been
231+
* modified to use square brace syntax
232+
* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a
233+
* for additional references
234+
*
229235
* @author <hsivonen@iki.fi>
230236
* @param string UTF-8 encoded string
231237
* @return mixed integer constant describing problem or FALSE if valid UTF-8
@@ -244,7 +250,7 @@ function utf8_bad_identify($str, &$i) {
244250

245251
for($i = 0; $i < $len; $i++) {
246252

247-
$in = ord($str{$i});
253+
$in = ord($str[$i]);
248254

249255
if ( $mState == 0) {
250256

0 commit comments

Comments
 (0)