mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
Change fatal error into warning and ignore arguments over limit
This commit is contained in:
parent
2217bba732
commit
cef0d27af9
@ -179,12 +179,14 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
|
||||
escaped_index = index;
|
||||
if (zend_symtable_find(symtable1, escaped_index, index_len + 1, (void **) &gpc_element_p) == FAILURE
|
||||
|| Z_TYPE_PP(gpc_element_p) != IS_ARRAY) {
|
||||
if (zend_hash_num_elements(symtable1) >= PG(max_input_vars)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
|
||||
if (zend_hash_num_elements(symtable1) <= PG(max_input_vars)) {
|
||||
if (zend_hash_num_elements(symtable1) == PG(max_input_vars)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
|
||||
}
|
||||
MAKE_STD_ZVAL(gpc_element);
|
||||
array_init(gpc_element);
|
||||
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
|
||||
}
|
||||
MAKE_STD_ZVAL(gpc_element);
|
||||
array_init(gpc_element);
|
||||
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
|
||||
}
|
||||
if (index != escaped_index) {
|
||||
efree(escaped_index);
|
||||
@ -223,10 +225,14 @@ plain_var:
|
||||
zend_symtable_exists(symtable1, escaped_index, index_len + 1)) {
|
||||
zval_ptr_dtor(&gpc_element);
|
||||
} else {
|
||||
if (zend_hash_num_elements(symtable1) >= PG(max_input_vars)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
|
||||
if (zend_hash_num_elements(symtable1) <= PG(max_input_vars)) {
|
||||
if (zend_hash_num_elements(symtable1) == PG(max_input_vars)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
|
||||
}
|
||||
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
|
||||
} else {
|
||||
zval_ptr_dtor(&gpc_element);
|
||||
}
|
||||
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
|
||||
}
|
||||
if (escaped_index != index) {
|
||||
efree(escaped_index);
|
||||
|
Loading…
Reference in New Issue
Block a user