Changeset 12757
- Timestamp:
- Dec 17, 2011, 6:47:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/admin/include/image.class.php
r12750 r12757 422 422 423 423 $command = $imagickdir.'identify -format "%wx%h" "'.realpath($source_filepath).'"'; 424 @exec($command, $returnarray , $returnvalue);425 if( $returnvalueor !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)) 426 426 { 427 427 die("[External ImageMagick] Corrupt image"); … … 496 496 $dest = pathinfo($destination_filepath); 497 497 $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"'; 498 @exec($exec, $returnarray , $returnvalue);499 return !$returnvalue;498 @exec($exec, $returnarray); 499 return is_array($returnarray); 500 500 } 501 501 }
Note: See TracChangeset
for help on using the changeset viewer.