[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/image/functions/_getimagesize.xml?=
From:       Christoph_Michael_Becker <cmb () php ! net>
Date:       2017-03-17 12:12:36
Message-ID: svn-cmb-1489752756-342146-1176369130 () svn ! php ! net
[Download RAW message or body]

cmb                                      Fri, 17 Mar 2017 12:12:36 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=342146

Log:
Fix #74239: getimagesize returns incorrect value for corrupt file.

We promote the respective notice to a caution, move it up, and explain
that the returned array may contain nonsense.

Bug: https://bugs.php.net/74239 (Verified) getimagesize returns incorrect value for corrupt file.
      
Changed paths:
    U   phpdoc/en/trunk/reference/image/functions/getimagesize.xml

Modified: phpdoc/en/trunk/reference/image/functions/getimagesize.xml
===================================================================
--- phpdoc/en/trunk/reference/image/functions/getimagesize.xml	2017-03-17 07:31:34 UTC (rev 342145)
+++ phpdoc/en/trunk/reference/image/functions/getimagesize.xml	2017-03-17 12:12:36 UTC (rev 342146)
@@ -23,6 +23,19 @@
    <function>getimagesize</function> can also return some more information
    in <parameter>imageinfo</parameter> parameter.
   </para>
+  <caution>
+   <para>
+    This function expects <parameter>filename</parameter> to be a valid
+    image file. If a non-image file is supplied, it may be incorrectly
+    detected as an image and the function will return successfully, but
+    the array may contain nonsentical values.
+   </para>
+   <para>
+    Do not use <function>getimagesize</function> to check that a given
+    file is a valid image. Use a purpose-built solution such as the
+    <link linkend="book.fileinfo">Fileinfo</link> extension instead.
+   </para>
+  </caution>
   <note>
    <simpara>
     Note that JPC and JP2 are capable of having components with different
@@ -279,18 +292,6 @@
  <refsect1 role="notes">
   &reftitle.notes;
   &note.gd.notrequired;
-  <note>
-   <para>
-    This function expects <parameter>filename</parameter> to be a valid
-    image file. If a non-image file is supplied, it may be incorrectly
-    detected as an image and the function will return successfully.
-   </para>
-   <para>
-    Do not use <function>getimagesize</function> to check that a given
-    file is a valid image. Use a purpose-built solution such as the
-    <link linkend="book.fileinfo">Fileinfo</link> extension instead.
-   </para>
-  </note>
  </refsect1>

  <refsect1 role="seealso">



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic