|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-07 14:23 UTC] alexander dot wahl at netclusive dot com
Description:
------------
PharData::convertToExecutable does not recognize filenames with multiple
dots, while creating the new archive. Everything from the first dot is
ignored.
Reproduce code:
---------------
<?php
try {
$oTarPhar = new PharData(realpath('test.one.two.tar'), Phar::NONE, '.tar');
$oTarPhar->convertToExecutable(Phar::PHAR, Phar::NONE, '.phar');
} catch (Exception $e) {
echo $e->getMessage();
}
?>
Expected result:
----------------
A new PHAR archive with the expected filename:
test.one.two.phar
Actual result:
--------------
A new PHAR archive with the filename:
test.phar
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
<?php try { $oTarPhar = new PharData(realpath('test.one.two.tar'), Phar::NONE, '.tar'); $oTarPhar->convertToExecutable(Phar::PHAR, Phar::NONE, '.one.two.phar'); } catch (Exception $e) { echo $e->getMessage(); } ?> will do what you desire.