added note that getimagesize() is not suitable to detect whether a file is an

image (contributed by Boris Madzar)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337230 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2015-07-23 21:59:05 +00:00
parent f4f505e665
commit 1f4b86ab4b

View file

@ -273,6 +273,18 @@ if (isset($info["APP13"])) {
<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">