com php-src: Fix #76706: mbstring.http_output_conv_mime types is ignored: NEWS ext/mbstring/mbstring.c

From: Date: Sat, 04 Aug 2018 21:24:04 +0000
Subject: com php-src: Fix #76706: mbstring.http_output_conv_mime types is ignored: NEWS ext/mbstring/mbstring.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102815@lists.php.net to get a copy of this message
Commit: 70ecb6e50b983419f6a2d5e028f9779354047ec1 Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 4 Aug 2018 23:24:04 +0200 Parents: 99020cc085063819ab6cecb5a4594b90d0ec6e7f Branches: PHP-7.3 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=70ecb6e50b983419f6a2d5e028f9779354047ec1 Log: Fix #76706: mbstring.http_output_conv_mimetypes is ignored _php_mb_match_regex() is supposed to return != 0 on success, and 0 on failure. pcre2_match() returns >= 0 on success, and < 0 on failure. We map the result accordingly. Since this patch fixes four failing tests, there is no need to add another. Bugs: https://bugs.php.net/76706 Changed paths: M NEWS M ext/mbstring/mbstring.c Diff: diff --git a/NEWS b/NEWS index 4bfe216..2765c7d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - mbstring: . Fixed bug #76704 (mb_detect_order return value varies based on argument type). (cmb) + . Fixed bug #76706 (mbstring.http_output_conv_mimetypes is ignored). (cmb) - phpdbg: . Fixed bug #76595 (phpdbg man page contains outdated information). diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index bb464d0..cdecd99 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1068,7 +1068,7 @@ static int _php_mb_match_regex(void *opaque, const char *str, size_t str_len) php_error_docref(NULL, E_WARNING, "Cannot allocate match data"); return FAILURE; } - res = pcre2_match(opaque, (PCRE2_SPTR)str, str_len, 0, 0, match_data, php_pcre_mctx()); + res = pcre2_match(opaque, (PCRE2_SPTR)str, str_len, 0, 0, match_data, php_pcre_mctx()) >= 0; php_pcre_free_match_data(match_data); return res;

« previous php.cvs (#102815) next »