From 5de7115679522dec2f4725104c6f8c6e4a7bd8e4 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 18 Feb 2014 16:27:38 +0400 Subject: Use better data structures (incomplete; able to run bench.php) --- main/php_ini.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'main/php_ini.c') diff --git a/main/php_ini.c b/main/php_ini.c index cb68d83e65..0c2ccc958f 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -837,8 +837,7 @@ PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSR if (has_per_host_config && host && host_len) { /* Search for source array matching the host from configuration_hash */ -//??? remove -1 - if ((tmp = zend_hash_str_find(&configuration_hash, host, host_len-1)) != NULL) { + if ((tmp = zend_hash_str_find(&configuration_hash, host, host_len)) != NULL) { php_ini_activate_config(Z_ARRVAL_P(tmp), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); } } @@ -849,8 +848,7 @@ PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSR */ PHPAPI zval *cfg_get_entry(const char *name, uint name_length) { -//??? remove -1 - return zend_hash_str_find(&configuration_hash, name, name_length-1); + return zend_hash_str_find(&configuration_hash, name, name_length); } /* }}} */ -- cgit v1.2.1