mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Merge branch 'PHP-5.6' into PHP-7.0
This commit is contained in:
commit
078f674212
3 changed files with 24 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -19,6 +19,10 @@ PHP NEWS
|
|||
- IMAP:
|
||||
. Fixed bug #72852 (imap_mail null dereference). (Anatol)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #65732 (grapheme_*() is not Unicode compliant on CR LF
|
||||
sequence). (cmb)
|
||||
|
||||
- OCI8
|
||||
. Fixed invalid handle error with Implicit Result Sets. (Chris Jones)
|
||||
. Fixed bug #72524 (Binding null values triggers ORA-24816 error). (Chris Jones)
|
||||
|
|
|
@ -223,7 +223,7 @@ zend_long grapheme_ascii_check(const unsigned char *day, size_t len)
|
|||
{
|
||||
int ret_len = len;
|
||||
while ( len-- ) {
|
||||
if ( *day++ > 0x7f )
|
||||
if ( *day++ > 0x7f || (*day == '\n' && *(day - 1) == '\r') )
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
19
ext/intl/tests/bug65732.phpt
Normal file
19
ext/intl/tests/bug65732.phpt
Normal file
|
@ -0,0 +1,19 @@
|
|||
--TEST--
|
||||
Bug #65732 (grapheme_*() is not Unicode compliant on CR LF sequence)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl')) die('skip intl extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(grapheme_strlen("\r\n"));
|
||||
var_dump(grapheme_substr(implode("\r\n", ['abc', 'def', 'ghi']), 5));
|
||||
var_dump(grapheme_strrpos("a\r\nb", 'b'));
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
int(1)
|
||||
string(7) "ef
|
||||
ghi"
|
||||
int(2)
|
||||
==DONE==
|
Loading…
Add table
Add a link
Reference in a new issue