Edit report at http://bugs.php.net/bug.php?id=51700&edit=1
ID: 51700 Updated by: ka...@php.net Reported by: shaedomail at gmail dot com Summary: does not work properly for swf / swc files -Status: Open +Status: Assigned Type: Bug Package: GetImageSize related Operating System: WA(MP) and LA(MP) PHP Version: 5.2.13 -Assigned To: +Assigned To: kalle New Comment: Right, so did I understand this correctly; image_type_to_extension(13) /* ala. IMAGETYPE_SWC */ should return swc, not swf? Previous Comments: ------------------------------------------------------------------------ [2010-04-30 06:15:18] shaedomail at gmail dot com Description: ------------ <?php echo image_type_to_extension (4)."<br>"; // swf echo image_type_to_extension (13)."<br>"; // swf // should be '.swc' //if $_FILES['Filedata'] is a swf file and you .... list(,,$image_type) = getimagesize($_FILES['Filedata']["tmp_name"]); // then .... echo $image_type;// 13 // should be '4' I tried this with a variety of swf files, compiled using CS4, CS3, for AS2 and AS3, for FP10 and FP8 but the results are the same regardless (did not try AS3 for FP8) Test script: --------------- <?php echo image_type_to_extension (4)."<br>"; // swf echo image_type_to_extension (13)."<br>"; // swf // if $_FILES['Filedata'] is a swf file and you .... //list(,,$image_type) = getimagesize($_FILES['Filedata']["tmp_name"]); // then .... //echo $image_type;// 13 Expected result: ---------------- <?php echo image_type_to_extension (4)."<br>"; // swf echo image_type_to_extension (13)."<br>"; // swc Actual result: -------------- <?php echo image_type_to_extension (4)."<br>"; // swf echo image_type_to_extension (13)."<br>"; // swf ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51700&edit=1