php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5299 fputs() doesn't use file pointer (fopen()) if it is contained within ""
Submitted: 2000-07-01 05:01 UTC Modified: 2000-07-04 11:11 UTC
From: kyledrake at usinternet dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Release Candidate 1 OS: Linux 2.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kyledrake at usinternet dot com
New email:
PHP Version: OS:

 

 [2000-07-01 05:01 UTC] kyledrake at usinternet dot com
a compatibility issue:
when pointers to a file (ex. $file = fopen("file", "a"); ) are used in function
fputs using quotes, like so:

fputs("$file", "Text blah blah");
it does not do the function and tells you it is an invalid file pointer.

this would work with no problems in the 3.X releases.  the simple fix is to remove the quotes, and then it works fine.  I do not know if this problem exists beyond fputs()..

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-04 11:11 UTC] stas at cvs dot php dot net
Do not put file pointer variable in quotes.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 16:00:02 2026 UTC