1--TEST-- 2Phar: bug #69958: Segfault in Phar::convertToData on invalid file 3--EXTENSIONS-- 4phar 5--FILE-- 6<?php 7$tarphar = new PharData(__DIR__.'/bug69958.tar'); 8$phar = $tarphar->convertToData(Phar::TAR); 9?> 10--EXPECTF-- 11Fatal error: Uncaught BadMethodCallException: phar "%sbug69958.tar" exists and must be unlinked prior to conversion in %sbug69958.php:%d 12Stack trace: 13#0 %sbug69958.php(%d): PharData->convertToData(%d) 14#1 {main} 15 thrown in %sbug69958.php on line %d 16