Prevent error determining if path or content

Previously the following error was thrown when passing `$data` over the filesystem file name limit:

```
file_exists(): File name is longer than the maximum allowed path length on this platform
```
This commit is contained in:
Matthew Leffler 2015-12-24 16:11:10 -07:00 committed by Matthias Mullie
parent f394a878f0
commit ed15a34066

View File

@ -86,7 +86,7 @@ abstract class Minify
protected function load($data)
{
// check if the data is a file
if (file_exists($data) && is_file($data)) {
if (strpos($file, "\n") === false && file_exists($data) && is_file($data)) {
$data = file_get_contents($data);
// strip BOM, if any