PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Tools and Utilities » MIME_Type » Bug #2078

_fileAutoDetect should pass file in quotes

Details

Submitted2004-08-07 09:31 UTC
Fromscragz at hotmail dot com
Assignedieure
StatusClosed
PackageMIME_Type
PHP Version4.3.4
OSDebian Sarge
Roadmaps(Not assigned)

Comments

[2004-08-07 09:31 UTC] scragz at hotmail dot com

Description:
------------
Files with a space in the name that would otherwise detect fine fail because the call to System_Command::pushCommand does not put the filename in quotes.

Reproduce code:
---------------
<?php
MIME_Type::autoDetect('/tmp/some file');
// gives "/tmp/some: cannot open '/tmp/some' (No such file or directory)" error
?>

The solution is to change line ~382 to:
$cmd->pushCommand($fileCmd, "-bi '{$file}'");