#22177 [Bgs]: Warning: fopen() expects parameter 1 to be string
| From: | wez@php.net | Date: | Wed, 12 Feb 2003 00:25:35 +0000 |
| Subject: | #22177 [Bgs]: Warning: fopen() expects parameter 1 to be string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32850@lists.php.net to get a copy of this message | ||
ID: 22177
Updated by: wez@php.net
Reported By: laudanp@yahoo.com
Status: Bogus
Bug Type: Filesystem function related
Operating System: RedHat
PHP Version: 4.3.0
New Comment:
keep it "bogus" please.
Previous Comments:
------------------------------------------------------------------------
[2003-02-11 18:25:02] nicos@php.net
Thank you for the thank. Now leave this bug as it should be for our
stat system.
BOGUS !
------------------------------------------------------------------------
[2003-02-11 18:22:38] laudanp@yahoo.com
Thanks.
------------------------------------------------------------------------
[2003-02-11 18:22:02] wez@php.net
For support:
http://www.php.net/support.php
------------------------------------------------------------------------
[2003-02-11 18:19:33] laudanp@yahoo.com
Quote: "The fact that this "worked" for you in 4.2.3 indicates a bug in
4.2.3 that has been fixed in 4.3."
Now that is an idea that didn't occur to me. And since php 4.2.3 may
have been buggy then obviously the fix is to upgrade to 4.3 and rewrite
it the way you folks suggest.
Thanks for that answer, a much more mature one than RTFM.
Hence this isn't bogus but an actual bug that was in 4.2.3. And the
patch is to make sure the code is written correctly.
Thus one last question, looking at the code I initially posted, what
would be your suggestion if I may ask specifically tailored to my
problem?
------------------------------------------------------------------------
[2003-02-11 18:15:22] wez@php.net
"Warning: fopen() expects parameter 1 to be string"
Now read the manual for fopen -> parameter 1 needs to be a string.
You are passing a resource.
The fact that this "worked" for you in 4.2.3 indicates a bug in 4.2.3
that has been fixed in 4.3.
Your supposed temporary file name would be a string "Resource id #4",
which isn't a very good temporary file name.
You describe the expected behaviour of PHP, your script is broken,
therefore this is a user error, and thus a bogus report.
Now, please leave us in peace to fix real bugs.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22177
--
Edit this bug report at http://bugs.php.net/?id=22177&edit=1