diff options
Diffstat (limited to 'ext/phar/tests/fopen_edgecases2.phpt')
-rw-r--r-- | ext/phar/tests/fopen_edgecases2.phpt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt index b32755bf9e..840c039d9e 100644 --- a/ext/phar/tests/fopen_edgecases2.phpt +++ b/ext/phar/tests/fopen_edgecases2.phpt @@ -10,7 +10,11 @@ Phar::interceptFileFuncs(); $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -fopen(array(), 'r'); +try { + fopen(array(), 'r'); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} chdir(__DIR__); file_put_contents($fname, "blah\n"); file_put_contents("fopen_edgecases2.txt", "test\n"); @@ -35,7 +39,7 @@ include $pname . '/foo/hi'; <?php rmdir(__DIR__ . '/poo'); ?> <?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 +fopen() expects parameter 1 to be a valid path, array given blah test |