Home » Tools and Utilities » MIME_Type » Bug #2078
_fileAutoDetect should pass file in quotes
Details
| Submitted | 2004-08-07 09:31 UTC |
|---|---|
| From | scragz at hotmail dot com |
| Assigned | ieure |
| Status | Closed |
| Package | MIME_Type |
| PHP Version | 4.3.4 |
| OS | Debian 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}'");