php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29387 pdf_open_file requires 2 arguments where 1 should be permitted
Submitted: 2004-07-26 13:48 UTC Modified: 2004-11-08 12:10 UTC
Votes:9
Avg. Score:4.3 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:3 (42.9%)
From: emile dot axelrad at connect dot co dot uk Assigned: hholzgra (profile)
Status: Not a bug Package: *PDF functions
PHP Version: 5.0.0 OS: Windows 2000
Private report: No CVE-ID: None
 [2004-07-26 13:48 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-10 21:27 UTC] jeremydurham at gmail dot com
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
 [2004-11-08 12:10 UTC] john@php.net
You're using the PHP 5 version of the extension and the API has changed. 
 [2013-08-16 09:56 UTC] daijie@php.net
Automatic comment from SVN on behalf of daijie
Revision: http://svn.php.net/viewvc/?view=revision&revision=331140
Log: 一些更新 和 新的翻译

--
Provided by anonymous #29387 (gongteng524702837@gmail.com)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC