From 1f4b86ab4b46e7e8b1038336b2c98318e70d3408 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Thu, 23 Jul 2015 21:59:05 +0000 Subject: [PATCH] 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 --- reference/image/functions/getimagesize.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reference/image/functions/getimagesize.xml b/reference/image/functions/getimagesize.xml index df310aee08..8127ff22cc 100644 --- a/reference/image/functions/getimagesize.xml +++ b/reference/image/functions/getimagesize.xml @@ -273,6 +273,18 @@ if (isset($info["APP13"])) { &reftitle.notes; ¬e.gd.notrequired; + + + This function expects filename 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. + + + Do not use getimagesize to check that a given + file is a valid image. Use a purpose-built solution such as the + Fileinfo extension instead. + +