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  


 [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.