private function activate($temp) {
if ($this->args->ini) {
- $files = [realpath($this->args->ini)];
+ $files = [$this->args->ini];
} else {
$files = array_filter(array_map("trim", explode(",", php_ini_scanned_files())));
$files[] = php_ini_loaded_file();
if ($verbose) {
printf("Checking %s ...\n", $file);
}
+ if (!file_exists($file)) {
+ throw new Exception(sprintf("INI file '%s' does not exist", $file));
+ }
$temp = new Tempfile("phpini");
foreach (file($file) as $line) {
if (preg_match("/^\s*{$this->type}\s*=\s*[\"']?{$pattern}[\"']?\s*(;.*)?\$/", $line)) {