Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/standard/tests/ini_info/php_ini_loaded_file.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ php_ini_loaded_file() function
$code = '"var_dump(php_ini_loaded_file());"';

// No ini file ($args mays contains some)
passthru("$php -n -r $code");
passthru("$php $args -n -r $code");

// Specified ini file
passthru("$php $args -c $inifile -r $code");
Expand Down
7 changes: 7 additions & 0 deletions sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,12 +1266,19 @@ PHP_CLI_API int do_php_cli(int argc, char *argv[])
while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1, 2))!=-1) {
switch (c) {
case 'c':
/* later -c override earlier -n */
ini_ignore = 0;
if (ini_path_override) {
free(ini_path_override);
}
ini_path_override = strdup(php_optarg);
break;
case 'n':
/* later -n override earlier -c */
if (ini_path_override) {
free(ini_path_override);
}
ini_path_override = NULL;
ini_ignore = 1;
break;
case 'd':
Expand Down
Loading