mirror of
https://github.com/php/php-src.git
synced 2026-04-23 16:08:35 +02:00
A better fix for #55817 (thanks to bjori)
This commit is contained in:
@@ -3017,7 +3017,7 @@ PHP_FUNCTION(mb_detect_encoding)
|
||||
/* make encoding list */
|
||||
list = NULL;
|
||||
size = 0;
|
||||
if (ZEND_NUM_ARGS() >= 2) {
|
||||
if (ZEND_NUM_ARGS() >= 2 && !ZVAL_IS_NULL(encoding_list)) {
|
||||
switch (Z_TYPE_P(encoding_list)) {
|
||||
case IS_ARRAY:
|
||||
if (!php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) {
|
||||
|
||||
Reference in New Issue
Block a user