Bug #13258 Updated: pdf_place_image dies when image file is not accessible

From: Date: Mon, 08 Oct 2001 17:23:48 +0000
Subject: Bug #13258 Updated: pdf_place_image dies when image file is not accessible
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67558@lists.php.net to get a copy of this message
ID: 13258 Updated by: rjs Reported By: rob@rsee.net Old Status: Open Status: Bogus Bug Type: PDF related Operating System: Linux 2.4 PHP Version: 4.0.6 New Comment: you should use something like: if (!$image) { die("Couldn't open image ".$imagefile); } to check whether the image was existing, otherwise PDFlib will throw an exception when you use the invalid image handle afterwards. Previous Comments: ------------------------------------------------------------------------ [2001-09-12 01:07:03] rob@rsee.net The following code causes a script to silently die on the call to pdf_place_image when the file in pdf_open_image_file is not accessible (exists but file permissions deny access). $image=pdf_open_image_file($pdf,"png","/usr/local/apache/htdocs/images/timesheet.png"); pdf_place_image($pdf, $image, 1, 1,.48); ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13258&edit=1

« previous php.dev (#67558) next »