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

Request #16487 Insert on new box throws warning
Submitted: 2009-08-02 17:42 UTC
From: cweiske Assigned: cweiske
Status: Closed Package: Mail_Mbox (version 0.5.2)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 40 - 11 = ?

 
 [2009-08-02 17:42 UTC] cweiske (Christian Weiske)
Description: ------------ Follow up of bug #15559: Test script: --------------- require_once("Mail/Mbox.php"); $mbox = new Mail_Mbox("my.mbox"); $mbox->open(); $mbox->insert("From asd", null); $mbox->close(); Expected result: ---------------- The warning PHP Warning: filemtime(): stat failed for my.mbox in /usr/share/pear/Mail/Mbox.php on line 657 should absolutely be suppressed

Comments

 [2009-08-02 20:25 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Verified -Type: Bug +Type: Feature/Change Request
Technically, this is not a bug - open() returns a PEAR_Error object stating that the file does not exist. The solution is to add support for creating mbox files: - open($create = false) - create() open() would call create() if the $create parameter was passed. create() itself would create it.
 [2009-08-02 21:25 UTC] cweiske (Christian Weiske)
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cweiske
Implemented in release 0.6.0.