svn: /phpdoc/en/trunk/reference/image/functions/ getimagesize.xml
| From: | Christoph Michael Becker | Date: | Thu, 23 Jul 2015 21:59:05 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/image/functions/ getimagesize.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13481@lists.php.net to get a copy of this message | ||
cmb Thu, 23 Jul 2015 21:59:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337230
Log:
added note that getimagesize() is not suitable to detect whether a file is an
image (contributed by Boris Madzar)
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 2015-07-23 18:54:53 UTC (rev 337229)
+++ phpdoc/en/trunk/reference/image/functions/getimagesize.xml 2015-07-23 21:59:05 UTC (rev 337230)
@@ -273,6 +273,18 @@
<refsect1 role="notes">
&reftitle.notes;
¬e.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">