PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2018, PHP 7.2.10
+?? ??? ????, PHP 7.3.0beta2
-16 Aug 2018, PHP 7.2.9
-
-- Calendar:
- . Fixed bug #52974 (jewish.c: compile error under Windows with GBK charset).
- (cmb)
+ - mbstring:
+ . Fixed bug #76704 (mb_detect_order return value varies based on argument
+ type). (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).
};
/* }}} */
+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.
*/