1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/phar/tests/bug69958.phpt
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

18 lines
592 B
PHP

--TEST--
Phar: bug #69958: Segfault in Phar::convertToData on invalid file
--XFAIL--
Still has memory leaks, see https://bugs.php.net/bug.php?id=70005
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
<?php
$tarphar = new PharData(__DIR__.'/bug69958.tar');
$phar = $tarphar->convertToData(Phar::TAR);
?>
--EXPECTF--
Fatal error: Uncaught BadMethodCallException: phar "%s/bug69958.tar" exists and must be unlinked prior to conversion in %s/bug69958.php:%d
Stack trace:
#0 %s/bug69958.php(%d): PharData->convertToData(%d)
#1 {main}
thrown in %s/bug69958.php on line %d