Skip to content

Commit

Permalink
Define php_ini_scanned_files [closes #3550]
Browse files Browse the repository at this point in the history
Also make php_ini_loaded_file() non-native, since it is just a stub.
  • Loading branch information
Majkl578 committed Sep 30, 2014
1 parent cfa550c commit a59f1e8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
5 changes: 0 additions & 5 deletions hphp/runtime/ext/std/ext_std_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,6 @@ static bool HHVM_FUNCTION(hphp_memory_stop_interval) {
return MM().stopStatsInterval();
}

static Variant HHVM_FUNCTION(php_ini_loaded_file) {
return false;
}

String HHVM_FUNCTION(php_sapi_name) {
return RuntimeOption::ExecutionMode;
}
Expand Down Expand Up @@ -1224,7 +1220,6 @@ void StandardExtension::initOptions() {
HHVM_FE(hphp_memory_get_interval_peak_usage);
HHVM_FE(hphp_memory_start_interval);
HHVM_FE(hphp_memory_stop_interval);
HHVM_FE(php_ini_loaded_file);
HHVM_FE(php_sapi_name);
HHVM_FE(php_uname);
HHVM_FE(phpinfo);
Expand Down
12 changes: 10 additions & 2 deletions hphp/runtime/ext/std/ext_std_options.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,16 @@ function hphp_memory_stop_interval(): bool;

/* Retrieve a path to the loaded php.ini file.
*/
<<__Native>>
function php_ini_loaded_file(): mixed;
function php_ini_loaded_file(): mixed {
return false;
}

/* Retrieve a comma-separated list of paths to any additionally loaded ini
* files after php.ini.
*/
function php_ini_scanned_files(): mixed {
return false;
}

<<__Native>>
function php_sapi_name(): string;
Expand Down
3 changes: 3 additions & 0 deletions hphp/test/slow/ext_options/php_ini_scanned_files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

var_dump(php_ini_scanned_files());
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bool(false)

0 comments on commit a59f1e8

Please sign in to comment.