diff options
| author | George Peter Banyard <girgias@php.net> | 2020-04-07 22:23:24 +0200 | 
|---|---|---|
| committer | George Peter Banyard <girgias@php.net> | 2020-04-07 22:23:24 +0200 | 
| commit | 6031b0824012065b679ed193b6e11b324a5cc92e (patch) | |
| tree | 137b8060dfd779bbf45d78c03c43736d5e073ec2 /ext | |
| parent | efec22b7bedfb1eae2df72b84cf5ad229e0bdc1e (diff) | |
| download | php-git-6031b0824012065b679ed193b6e11b324a5cc92e.tar.gz | |
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.
This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/mbstring/mbstring.c | 2 | ||||
| -rw-r--r-- | ext/mbstring/tests/bug79448.phpt | 11 | 
2 files changed, 1 insertions, 12 deletions
| diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ba30e05c27..0f466a02ee 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2038,7 +2038,7 @@ PHP_FUNCTION(mb_detect_order)  static inline int php_mb_check_code_point(zend_long cp)  { -	if (cp < 0 || cp >= 0x110000) { +	if (cp <= 0 || cp >= 0x110000) {  		/* Out of Unicode range */  		return 0;  	} diff --git a/ext/mbstring/tests/bug79448.phpt b/ext/mbstring/tests/bug79448.phpt deleted file mode 100644 index 09052943cc..0000000000 --- a/ext/mbstring/tests/bug79448.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #79448 	0 is a valid Unicode codepoint, but mb_substitute_character(0) fails ---SKIPIF-- -<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> ---FILE-- -<?php -// 0 is a valid codepoint regardless of encoding -var_dump(mb_substitute_character(0)); -?> ---EXPECT-- -bool(true) | 
