1
0
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:
Xinchen Hui
2011-09-30 15:08:32 +00:00
parent f40e5204d4
commit 554dd6cd02
+1 -1
View File
@@ -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)) {