mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix GH-15087 IntlChar::foldCase()'s $option is not optional
Since that parameter is supposed to be optional (and has been prior to PHP 8.0.0), we fix the implementation instead of the stub. Closes GH-15091.
This commit is contained in:
3
NEWS
3
NEWS
@@ -18,6 +18,9 @@ PHP NEWS
|
||||
. Fixed bug GH-14286 (ffi enum type (when enum has no name) make memory
|
||||
leak). (nielsdos, dstogov)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug GH-15087 (IntlChar::foldCase()'s $option is not optional). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug GH-13817 (Segmentation fault for enabled observers after pass 4).
|
||||
(Bob)
|
||||
|
||||
10
ext/intl/uchar/tests/gh15087.phpt
Normal file
10
ext/intl/uchar/tests/gh15087.phpt
Normal file
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
GH-15087 (IntlChar::foldCase()'s $option is not optional)
|
||||
--EXTENSIONS--
|
||||
intl
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(IntlChar::foldCase('I'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "i"
|
||||
@@ -392,8 +392,9 @@ IC_METHOD(foldCase) {
|
||||
zend_string *string_codepoint;
|
||||
zend_long int_codepoint;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(2, 2)
|
||||
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||
Z_PARAM_OPTIONAL
|
||||
Z_PARAM_LONG(options)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user