#29387 [Com]: pdf_open_file requires 2 arguments where 1 should be permitted

From: Date: Fri, 10 Sep 2004 19:27:19 +0000
Subject: #29387 [Com]: pdf_open_file requires 2 arguments where 1 should be permitted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66027@lists.php.net to get a copy of this message
ID: 29387 Comment by: jeremydurham at gmail dot com Reported By: emile dot axelrad at connect dot co dot uk Status: Open Bug Type: *PDF functions Operating System: Windows 2000 PHP Version: 5.0.0 Assigned To: hholzgra New Comment: If you are searching for a resolution for this issue still, you should contact pdflib. This is an issue with the implementation of the functions in the pdf.c file. It can easily be corrected with a few changes but it is likely not the correct way to solve this problem. Jeremy Previous Comments: ------------------------------------------------------------------------ [2004-07-26 13:48:09] emile dot axelrad at connect dot co dot uk Description: ------------ The PHP manual describes pdf_open_file as working with just one argument (the pdf handle). This code works fine with PHP 4 but on PHP 5.0.0 does not work. It thinks that the 'filename' argument is required, but it is in fact optional. Reproduce code: --------------- $pdf = pdf_new(); pdf_open_file($pdf); Expected result: ---------------- It should work without an error. Should create a PDF document in memory, not in a file. Actual result: -------------- Fatal error: Uncaught exception 'PDFlibException' with message 'pdf_open_file() expects exactly 2 parameters, 1 given' in C:\test.php:2 Stack trace: #0 {main} thrown in C:\test.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29387&edit=1

« previous php.bugs (#66027) next »