mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
fixed C&P errors in groups handling, activated groups feature
This commit is contained in:
@@ -75,14 +75,14 @@ PHP_FUNCTION(mysqli_embedded_server_start)
|
||||
/* get groups */
|
||||
if ((zend_hash_num_elements(HASH_OF(*grps)))) {
|
||||
groups = safe_emalloc(sizeof(char *), zend_hash_num_elements(HASH_OF(*grps)) + 1, 0);
|
||||
arguments[0] = NULL;
|
||||
groups[0] = NULL;
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(HASH_OF(*args), &pos);
|
||||
zend_hash_internal_pointer_reset_ex(HASH_OF(*grps), &pos);
|
||||
|
||||
for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*args), &pos)) {
|
||||
for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*grps), &pos)) {
|
||||
zval ** item;
|
||||
|
||||
if (zend_hash_get_current_data_ex(HASH_OF(*args), (void **) &item, &pos) == FAILURE) {
|
||||
if (zend_hash_get_current_data_ex(HASH_OF(*grps), (void **) &item, &pos) == FAILURE) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ PHP_FUNCTION(mysqli_embedded_server_start)
|
||||
groups[0] = NULL;
|
||||
}
|
||||
|
||||
rc = mysql_server_init(argc, arguments, NULL);
|
||||
rc = mysql_server_init(argc, arguments, groups);
|
||||
|
||||
if (argc) {
|
||||
efree(arguments);
|
||||
|
||||
Reference in New Issue
Block a user