Skip to content

Commit

Permalink
Document the Joomla changes to the library
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Aug 4, 2019
1 parent 79516ac commit 1f5aa22
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ vendor/
composer.phar
composer.lock
phpunit.xml
.idea/
6 changes: 6 additions & 0 deletions src/phputf8/ord.php
Expand Up @@ -7,6 +7,12 @@
/**
* UTF-8 aware alternative to ord
* Returns the unicode ordinal for a character
*
* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result this function has been
* modified to use square brace syntax
* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a
* for additional references
*
* @param string UTF-8 encoded character
* @return int unicode ordinal for the character
* @see http://www.php.net/ord
Expand Down
6 changes: 6 additions & 0 deletions src/phputf8/utils/validation.php
Expand Up @@ -37,6 +37,12 @@ function utf8_is_valid($str) {

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

/*
* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result the line below has
* been modified to use square brace syntax
* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a
* for additional references
*/
$in = ord($str[$i]);

if ( $mState == 0) {
Expand Down

0 comments on commit 1f5aa22

Please sign in to comment.