From: Operating system: WA(MP) and LA(MP) PHP version: 5.2.13 Package: Unknown/Other Function Bug Type: Bug Bug description:does not work properley for swf / swc files
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 bug report at http://bugs.php.net/bug.php?id=51700&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51700&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51700&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51700&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51700&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51700&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51700&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51700&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51700&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51700&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51700&r=support Expected behavior: http://bugs.php.net/fix.php?id=51700&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51700&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51700&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51700&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51700&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51700&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51700&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51700&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51700&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51700&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51700&r=mysqlcfg