Changeset 12757


Ignore:
Timestamp:
Dec 17, 2011, 6:47:26 PM (13 years ago)
Author:
patdenice
Message:

merge r12756 from trunk to branch 2.3
bug:2537
Thumbnail creation may crash on some servers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/admin/include/image.class.php

    r12750 r12757  
    422422
    423423    $command = $imagickdir.'identify -format "%wx%h" "'.realpath($source_filepath).'"';
    424     @exec($command, $returnarray, $returnvalue);
    425     if($returnvalue or !preg_match('/^(\d+)x(\d+)$/', $returnarray[0], $match))
     424    @exec($command, $returnarray);
     425    if(!is_array($returnarray) or empty($returnarray[0]) or !preg_match('/^(\d+)x(\d+)$/', $returnarray[0], $match))
    426426    {
    427427      die("[External ImageMagick] Corrupt image");
     
    496496    $dest = pathinfo($destination_filepath);
    497497    $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"';
    498     @exec($exec, $returnarray, $returnvalue);
    499     return !$returnvalue;
     498    @exec($exec, $returnarray);
     499    return is_array($returnarray);
    500500  }
    501501}
Note: See TracChangeset for help on using the changeset viewer.