aichingm / rfc2epub

rfc2epub - create an epub ebook from an IETF RFC
Other
20 stars 2 forks source link

Deprecate curly braces array access #3

Closed taniokaeiji closed 4 years ago

taniokaeiji commented 4 years ago

After PHP 7.4, curly brace syntax for accessing array elements and string offsets was deprecated. https://wiki.php.net/rfc/deprecate_curly_braces_array_access

Fixed it and tested with PHP 7.4.6 on macOS 10.15.4, installed from Homebrew.

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.4
BuildVersion:   19E287
$ php -v
PHP 7.4.6 (cli) (built: May 14 2020 10:38:36) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies
taniokaeiji commented 4 years ago

This is the output before fix brackets.

$ php ./rfc2epub 1034 1034.epub
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96

Deprecated: Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96

Deprecated: Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96

Deprecated: Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96

Deprecated: Array and string offset access syntax with curly braces is deprecated in /Users/eternal/github/rfc2epub/rfc2epub on line 96
aichingm commented 4 years ago

Thanks for you contribution, looks good.