PHP  
 PHP_7_1
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for ext/phar/tests/bug69958.phpt ('Phar: bug #69958: Segfault in Phar::convertToData on invalid file')

Script

1: <?php
2: $tarphar 
= new PharData(__DIR__.'/bug69958.tar');
3:
$phar $tarphar->convertToData(Phar::TAR); 
4:

Expected

Fatal error: Uncaught exception 'BadMethodCallException' with message '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

Output

Fatal error: Uncaught BadMethodCallException: phar "/var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.tar" exists and must be unlinked prior to conversion in /var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.php:3
Stack trace:
#0 /var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.php(3): PharData->convertToData(2)
#1 {main}
  thrown in /var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.php on line 3

Diff

001+ Fatal error: Uncaught BadMethodCallException: phar "/var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.tar" exists and must be unlinked prior to conversion in /var/php_gcov/PHP_7_1/ext/phar/tests/bug69958.php:3
001- Fatal error: Uncaught exception 'BadMethodCallException' with message 'phar "%s/bug69958.tar" exists and must be unlinked prior to conversion' in %s/bug69958.php:%d

 

Generated at Fri, 01 Dec 2017 18:56:15 +0000 (14 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.