com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/mbstring/mbstring.c
| From: | Christoph Michael Becker | Date: | Sat, 04 Aug 2018 11:50:48 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/mbstring/mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102807@lists.php.net to get a copy of this message | ||
Commit: 5dc74d9e708bf52b2d7303a61cd3b35e0e57aa94
Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 4 Aug 2018 13:49:29 +0200
Parents: 81ebe930f32102136b30f23167561b08e646518b db8bcdba80530e68808ca588f6bfea79957dc80e
Branches: PHP-7.3 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5dc74d9e708bf52b2d7303a61cd3b35e0e57aa94
Log:
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix #76704: mb_detect_order return value varies based on argument type
Bugs:
https://bugs.php.net/76704
Changed paths:
MM NEWS
MM ext/mbstring/mbstring.c
Diff:
diff --cc NEWS
index a491bf1,379e1a9..4bfe216
--- a/NEWS
+++ b/NEWS
@@@ -1,16 -1,23 +1,20 @@@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2018, PHP 7.2.10
+?? ??? ????, PHP 7.3.0beta2
+ - mbstring:
+ . Fixed bug #76704 (mb_detect_order return value varies based on argument
+ type). (cmb)
+
-16 Aug 2018, PHP 7.2.9
-
-- Calendar:
- . Fixed bug #52974 (jewish.c: compile error under Windows with GBK charset).
- (cmb)
+- phpdbg:
+ . Fixed bug #76595 (phpdbg man page contains outdated information).
+ (Kevin Abel)
-- Filter:
- . Fixed bug #76366 (References in sub-array for filtering breaks the filter).
- (ZiHang Gao)
+02 Aug 2018, PHP 7.3.0beta1
-- PDO_Firebird:
- . Fixed bug #76488 (Memory leak when fetching a BLOB field). (Simonov Denis)
+- Core:
+ . Fixed bug #76667 (Segfault with divide-assign op and __get + __set).
+ (Laruence)
- PDO_PgSQL:
. Fixed bug #75402 (Possible Memory Leak using PDO::CURSOR_SCROLL option).
diff --cc ext/mbstring/mbstring.c
index eceafdd,2ec7f1a..bb464d0
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@@ -683,33 -701,8 +683,33 @@@ static const sapi_post_entry mbstr_post
};
/* }}} */
+static const mbfl_encoding *php_mb_get_encoding(const char *encoding_name) {
+ if (encoding_name) {
+ const mbfl_encoding *encoding;
+ if (MBSTRG(last_used_encoding_name)
+ && !strcasecmp(encoding_name, MBSTRG(last_used_encoding_name))) {
+ return MBSTRG(last_used_encoding);
+ }
+
+ encoding = mbfl_name2encoding(encoding_name);
+ if (!encoding) {
+ php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"",
encoding_name);
+ return NULL;
+ }
+
+ if (MBSTRG(last_used_encoding_name)) {
+ efree(MBSTRG(last_used_encoding_name));
+ }
+ MBSTRG(last_used_encoding_name) = estrdup(encoding_name);
+ MBSTRG(last_used_encoding) = encoding;
+ return encoding;
+ } else {
+ return MBSTRG(current_internal_encoding);
+ }
+}
+
/* {{{ static int php_mb_parse_encoding_list()
- * Return 0 if input contains any illegal encoding, otherwise 1.
+ * Return FAILURE if input contains any illegal encoding, otherwise SUCCESS.
* Even if any illegal encoding is detected the result may contain a list
* of parsed encodings.
*/