file_get_contents(array());
chdir(__DIR__);
file_put_contents($fname, "blah\n");
-file_put_contents("foob", "test\n");
+file_put_contents("fgc_edgecases.txt", "test\n");
echo file_get_contents($fname);
unlink($fname);
mkdir($pname . '/oops');
echo file_get_contents("foo/" . basename(__FILE__));
$context = stream_context_create();
file_get_contents("./hi", 0, $context, 0, -1);
-echo file_get_contents("foob");
+echo file_get_contents("fgc_edgecases.txt");
set_include_path("' . addslashes(__DIR__) . '");
-echo file_get_contents("foob", true);
+echo file_get_contents("fgc_edgecases.txt", true);
echo file_get_contents("./hi", 0, $context);
echo file_get_contents("../oops");
echo file_get_contents("./hi", 0, $context, 50000);
--CLEAN--
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
<?php rmdir(__DIR__ . '/poo'); ?>
-<?php unlink(__DIR__ . '/foob'); ?>
+<?php unlink(__DIR__ . '/fgc_edgecases.txt'); ?>
--EXPECTF--
Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %sfgc_edgecases.php on line %d
blah
echo file_get_contents("foo/" . basename(__FILE__));
$context = stream_context_create();
file_get_contents("./hi", 0, $context, 0, -1);
-echo file_get_contents("foob");
+echo file_get_contents("fgc_edgecases.txt");
set_include_path("%stests");
-echo file_get_contents("foob", true);
+echo file_get_contents("fgc_edgecases.txt", true);
echo file_get_contents("./hi", 0, $context);
echo file_get_contents("../oops");
echo file_get_contents("./hi", 0, $context, 50000);
echo file_get_contents("foo/" . basename(__FILE__));
$context = stream_context_create();
file_get_contents("./hi", 0, $context, 0, -1);
-echo file_get_contents("foob");
+echo file_get_contents("fgc_edgecases.txt");
set_include_path("%stests");
-echo file_get_contents("foob", true);
+echo file_get_contents("fgc_edgecases.txt", true);
echo file_get_contents("./hi", 0, $context);
echo file_get_contents("../oops");
echo file_get_contents("./hi", 0, $context, 50000);
echo file_get_contents("foo/" . basename(__FILE__));
$context = stream_context_create();
file_get_contents("./hi", 0, $context, 0, -1);
-echo file_get_contents("foob");
+echo file_get_contents("fgc_edgecases.txt");
set_include_path("%stests");
-echo file_get_contents("foob", true);
+echo file_get_contents("fgc_edgecases.txt", true);
echo file_get_contents("./hi", 0, $context);
echo file_get_contents("../oops");
echo file_get_contents("./hi", 0, $context, 50000);
fopen(array(), 'r');
chdir(__DIR__);
file_put_contents($fname, "blah\n");
-file_put_contents("foob", "test\n");
+file_put_contents("fopen_edgecases2.txt", "test\n");
$a = fopen($fname, 'rb');
echo fread($a, 1000);
fclose($a);
mkdir($pname . '/oops');
file_put_contents($pname . '/foo/hi', '<?php
$context = stream_context_create();
-$a = fopen("foob", "rb", false, $context);
+$a = fopen("fopen_edgecases2.txt", "rb", false, $context);
echo fread($a, 1000);
fclose($a);
fopen("../oops", "r");
--CLEAN--
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
<?php rmdir(__DIR__ . '/poo'); ?>
-<?php unlink(__DIR__ . '/foob'); ?>
+<?php unlink(__DIR__ . '/fopen_edgecases2.txt'); ?>
--EXPECTF--
Warning: fopen() expects parameter 1 to be a valid path, array given in %sfopen_edgecases2.php on line %d
blah
readfile(array());
chdir(__DIR__);
file_put_contents($fname, "blah\n");
-file_put_contents("foob", "test\n");
+file_put_contents("readfile_edgecases.txt", "test\n");
readfile($fname);
unlink($fname);
mkdir($pname . '/oops');
file_put_contents($pname . '/foo/hi', '<?php
readfile("foo/" . basename(__FILE__));
$context = stream_context_create();
-readfile("foob");
+readfile("readfile_edgecases.txt");
set_include_path("' . addslashes(__DIR__) . '");
-readfile("foob", true);
+readfile("readfile_edgecases.txt", true);
readfile("./hi", 0, $context);
readfile("../oops");
?>
--CLEAN--
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
<?php rmdir(__DIR__ . '/poo'); ?>
-<?php unlink(__DIR__ . '/foob'); ?>
+<?php unlink(__DIR__ . '/readfile_edgecases.txt'); ?>
--EXPECTF--
Warning: readfile() expects parameter 1 to be a valid path, array given in %sreadfile_edgecases.php on line %d
blah
<?php
readfile("foo/" . basename(__FILE__));
$context = stream_context_create();
-readfile("foob");
+readfile("readfile_edgecases.txt");
set_include_path("%stests");
-readfile("foob", true);
+readfile("readfile_edgecases.txt", true);
readfile("./hi", 0, $context);
readfile("../oops");
?>
<?php
readfile("foo/" . basename(__FILE__));
$context = stream_context_create();
-readfile("foob");
+readfile("readfile_edgecases.txt");
set_include_path("%stests");
-readfile("foob", true);
+readfile("readfile_edgecases.txt", true);
readfile("./hi", 0, $context);
readfile("../oops");
?>