Development

Changeset 23951

You must first sign up to be able to contribute.

Changeset 23951

Show
Ignore:
Timestamp:
11/14/09 21:44:22 (5 years ago)
Author:
FabianLange
Message:

[1.2, 1.3, 1.4] fixed file validator on certain mac os configurations (closes #6641)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/validator/sfValidatorFile.class.php

    r23074 r23951  
    251251  { 
    252252    ob_start(); 
    253     passthru(sprintf('file -bi %s 2>/dev/null', escapeshellarg($file)), $return); 
     253    //need to use --mime instead of -i. see #6641 
     254    passthru(sprintf('file -b --mime %s 2>/dev/null', escapeshellarg($file)), $return); 
    254255    if ($return > 0) 
    255256    { 
  • branches/1.3/lib/validator/sfValidatorFile.class.php

    r23073 r23951  
    254254  { 
    255255    ob_start(); 
    256     passthru(sprintf('file -bi %s 2>/dev/null', escapeshellarg($file)), $return); 
     256    //need to use --mime instead of -i. see #6641 
     257    passthru(sprintf('file -b --mime %s 2>/dev/null', escapeshellarg($file)), $return); 
    257258    if ($return > 0) 
    258259    { 
  • branches/1.4/lib/validator/sfValidatorFile.class.php

    r23073 r23951  
    254254  { 
    255255    ob_start(); 
    256     passthru(sprintf('file -bi %s 2>/dev/null', escapeshellarg($file)), $return); 
     256    //need to use --mime instead of -i. see #6641 
     257    passthru(sprintf('file -b --mime %s 2>/dev/null', escapeshellarg($file)), $return); 
    257258    if ($return > 0) 
    258259    {