php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51700 does not work properly for swf / swc files
Submitted: 2010-04-30 06:15 UTC Modified: 2010-06-09 12:17 UTC
From: shaedomail at gmail dot com Assigned: kalle (profile)
Status: No Feedback Package: GetImageSize related
PHP Version: 5.2.13 OS: WA(MP) and LA(MP)
Private report: No CVE-ID: None
 [2010-04-30 06:15 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-02 20:10 UTC] felipe@php.net
-Package: Unknown/Other Function +Package: GetImageSize related
 [2010-05-04 03:07 UTC] felipe@php.net
-Summary: does not work properley for swf / swc files +Summary: does not work properly for swf / swc files
 [2010-05-09 00:42 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kalle
 [2010-05-09 00:42 UTC] kalle@php.net
Right, so did I understand this correctly; image_type_to_extension(13) /* ala. IMAGETYPE_SWC */ should return swc, not swf?
 [2010-06-09 12:17 UTC] kalle@php.net
-Status: Assigned +Status: No Feedback
 [2010-06-09 12:17 UTC] kalle@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 16:01:30 2024 UTC