Bug #51700 [Opn->Asn]: does not work properly for swf / swc files

From: Date: Sat, 08 May 2010 22:42:07 +0000
Subject: Bug #51700 [Opn->Asn]: does not work properly for swf / swc files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150278@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51700&edit=1

 ID:               51700
 Updated by:       kalle@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


Thread (3 messages)

« previous php.bugs (#150278) next »