} else {
display_string = "no value";
display_string_length = sizeof("no value") - 1;
- }
+ }
}
} else if (ini_entry->value && ini_entry->value[0]) {
display_string = ini_entry->value;
} else {
display_string = "no value";
display_string_length = sizeof("no value") - 1;
- }
+ }
}
if (esc_html) {
PUTS(" => ");
php_ini_displayer_cb(ini_entry, ZEND_INI_DISPLAY_ORIG);
PUTS("\n");
- }
+ }
return 0;
}
/* }}} */
if (module) {
module_number = module->module_number;
- } else {
+ } else {
module_number = 0;
}
php_info_print_table_start();
}
if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */
zval copy;
-
+
copy = *arg2;
zval_copy_ctor(©);
copy.refcount = 0;
- zend_llist_add_element(&extension_lists.functions, ©);
+ zend_llist_add_element(&extension_lists.functions, ©);
} else if (!strcasecmp(Z_STRVAL_P(arg1), ZEND_EXTENSION_TOKEN)) { /* load Zend extension */
char *extension_name = estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2));
-
+
zend_llist_add_element(&extension_lists.engine, &extension_name);
} else {
zend_hash_update(&configuration_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, arg2, sizeof(zval), (void **) &entry);
*element = *arg2;
zval_copy_ctor(element);
INIT_PZVAL(element);
- add_next_index_zval(hash, element);
+ add_next_index_zval(hash, element);
}
break;
/* {{{ pvalue_config_destructor
*/
static void pvalue_config_destructor(zval *pvalue)
-{
+{
if (Z_TYPE_P(pvalue) == IS_STRING) {
free(Z_STRVAL_P(pvalue));
}
}
zend_llist_init(&extension_lists.engine, sizeof(char *), (llist_dtor_func_t) free_estring, 1);
- zend_llist_init(&extension_lists.functions, sizeof(zval), (llist_dtor_func_t) ZVAL_DESTRUCTOR, 1);
+ zend_llist_init(&extension_lists.functions, sizeof(zval), (llist_dtor_func_t) ZVAL_DESTRUCTOR, 1);
zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1);
-
+
safe_mode_state = PG(safe_mode);
open_basedir = PG(open_basedir);
}
} else if (!VCWD_REALPATH(sapi_module.executable_location, binary_location) || VCWD_ACCESS(binary_location, X_OK)) {
efree(binary_location);
- binary_location = NULL;
+ binary_location = NULL;
}
} else {
binary_location = NULL;
#endif
if (binary_location) {
char *separator_location = strrchr(binary_location, DEFAULT_SLASH);
-
+
if (separator_location && separator_location != binary_location) {
*(separator_location) = 0;
}
/* Add default location */
#ifdef PHP_WIN32
default_location = (char *) emalloc(MAXPATHLEN + 1);
-
+
if (0 < GetWindowsDirectory(default_location, MAXPATHLEN)) {
if (*php_ini_search_path) {
strlcat(php_ini_search_path, paths_separator, search_path_size);
if (!sapi_module.php_ini_ignore) {
if (php_ini_file_name && php_ini_file_name[0]) {
struct stat statbuf;
-
+
if (!VCWD_STAT(php_ini_file_name, &statbuf)) {
if (!((statbuf.st_mode & S_IFMT) == S_IFDIR)) {
fh.handle.fp = VCWD_FOPEN(php_ini_file_name, "r");
fh.type = ZEND_HANDLE_FP;
zend_parse_ini_file(&fh, 1, php_config_ini_parser_cb, &extension_lists);
-
+
{
zval tmp;
-
+
Z_STRLEN(tmp) = strlen(fh.filename);
Z_STRVAL(tmp) = zend_strndup(fh.filename, Z_STRLEN(tmp));
Z_TYPE(tmp) = IS_STRING;
/* Here, add it to the list of ini files read */
l = strlen(ini_file);
total_l += l + 2;
- p = estrndup(ini_file, l);
+ p = estrndup(ini_file, l);
zend_llist_add_element(&scanned_ini_list, &p);
}
}
}
free(namelist);
- /*
+ /*
* Don't need an extra byte for the \0 in this malloc as the last
* element will not get a trailing , which gives us the byte for the \0
*/
for (element = scanned_ini_list.head; element; element = element->next) {
strlcat(php_ini_scanned_files, *(char **)element->data, total_l);
strlcat(php_ini_scanned_files, element->next ? ",\n" : "\n", total_l);
- }
+ }
}
zend_llist_destroy(&scanned_ini_list);
}