diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-09-01 20:57:33 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-09-01 20:57:33 +0400 |
commit | 88d7ca44f645c6e1bbdb17affd7a34113911093d (patch) | |
tree | 15c356bf3749c703ca52e89081ec8219d237b615 /Zend/zend_ini_parser.y | |
parent | b9f3247267299cd38da851057c1bb90090db3e20 (diff) | |
download | php-git-88d7ca44f645c6e1bbdb17affd7a34113911093d.tar.gz |
Refactored INI subsystem to use zend_string* instead of char*
Diffstat (limited to 'Zend/zend_ini_parser.y')
-rw-r--r-- | Zend/zend_ini_parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 5b1d0ae470..e343fcd92a 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -141,12 +141,12 @@ static void zend_ini_get_constant(zval *result, zval *name TSRMLS_DC) */ static void zend_ini_get_var(zval *result, zval *name TSRMLS_DC) { - zval curval; + zval *curval; char *envvar; /* Fetch configuration option value */ - if (zend_get_configuration_directive(Z_STRVAL_P(name), Z_STRLEN_P(name), &curval) == SUCCESS) { - ZVAL_PSTRINGL(result, Z_STRVAL(curval), Z_STRLEN(curval)); + if ((curval = zend_get_configuration_directive(Z_STR_P(name))) != NULL) { + ZVAL_PSTRINGL(result, Z_STRVAL_P(curval), Z_STRLEN_P(curval)); /* ..or if not found, try ENV */ } else if ((envvar = zend_getenv(Z_STRVAL_P(name), Z_STRLEN_P(name) TSRMLS_CC)) != NULL || (envvar = getenv(Z_STRVAL_P(name))) != NULL) { |