Skip to content

Commit 58ac56f

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-15087 IntlChar::foldCase()'s $option is not optional
2 parents 6727f54 + ce25be5 commit 58ac56f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ PHP NEWS
2323
- Intl:
2424
. Added SpoofChecker::setAllowedChars to set unicode chars ranges.
2525
(David Carlier)
26+
. Fixed bug GH-15087 (IntlChar::foldCase()'s $option is not optional). (cmb)
2627

2728
- Opcache:
2829
. Fixed bug GH-13775 (Memory leak possibly related to opcache SHM placement).

ext/intl/uchar/tests/gh15087.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
GH-15087 (IntlChar::foldCase()'s $option is not optional)
3+
--EXTENSIONS--
4+
intl
5+
--FILE--
6+
<?php
7+
var_dump(IntlChar::foldCase('I'));
8+
?>
9+
--EXPECT--
10+
string(1) "i"

ext/intl/uchar/uchar.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ IC_METHOD(foldCase) {
401401
zend_string *string_codepoint;
402402
zend_long int_codepoint = 0;
403403

404-
ZEND_PARSE_PARAMETERS_START(2, 2)
404+
ZEND_PARSE_PARAMETERS_START(1, 2)
405405
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
406+
Z_PARAM_OPTIONAL
406407
Z_PARAM_LONG(options)
407408
ZEND_PARSE_PARAMETERS_END();
408409

0 commit comments

Comments
 (0)