Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #2810 Can not call readAll two times !
Submitted: 2004-11-22 21:44 UTC
From: webmaster at clublegendes dot com Assigned: mike
Status: Closed Package: File
PHP Version: 5.0.1 OS: WinXP
Roadmaps: 1.3.0a1    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-12-27 04:49 UTC
Package:
Bug Type:
Summary:
From: webmaster at clublegendes dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-11-22 21:44 UTC] webmaster at clublegendes dot com
Description: ------------ Bonjour, I try to translate this bug. Well, it is impossible to call staticly two times the method readAll : If arguments are different, there is no bug. But if the second call to method readAll has the same argument than the first call, readAll return NULL and doesn't return the file content. I try it with Apache 1.3.31 and PHP 4.3.8 there is a bug. I try it with Apache 2.0.50 and PHP 5.0.1 there is a bug too. Reproduce code: --------------- <pre><?php //Version of File.php : // Installed 1.0.3 // Latest 1.0.3 require_once 'File.php'; //toto contents : Bonjour de France! $ls_file='toto.txt'; $ls_body = File::readAll($ls_file); if (PEAR::isError($ls_body)){ //the script doesn't pass here die ($ls_body->getMessage()); } else { //Well that works and retrun : ---Bonjour de France!--- echo "\n--- $ls_body ---\n"; } //BE carefull to view the bug : $ls_file DOESN'T CHANGE ! $ls_body = File::readAll($ls_file); if (PEAR::isError($ls_body)){ //the script doesn't pass here die ($ls_body->getMessage()); } else { //THE BUG IS HERE ! //expected result : ---Bonjour de France!--- //but return "--- ---" echo "\n--- $ls_body ---\n"; } ?></pre>

Comments

 [2004-12-16 14:55 UTC] mike
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.