mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
A better fix for #55817 (thanks to bjori)
This commit is contained in:
parent
f40e5204d4
commit
554dd6cd02
1 changed files with 1 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue