TheDesignspace
dotProject error: "date() expects parameter 2 to be long"


June 30, 2008
Web Building | PHP | Dotproject

Ever since installing version 2.x of dotProject, there has been a non-fatal error when creating a new task:


Warning: date() expects parameter 2 to be long, string given in /[...pathtodotproject...]/lib/PEAR/Date.php on line 179


Thanks to glynnsmith on the dotproject forums for coming up with a fix for the issue:

In /lib/PEAR/Date.php line 178-179 is:


case DATE_FORMAT_UNIXTIME:
$this->setDate(date("Y-m-d H:i:s", $date));
break

just change it to:

case DATE_FORMAT_UNIXTIME:
if ($date != '') {
    $this->setDate(date("Y-m-d H:i:s", $date));
        }
else {
    $this->setDate(null);
    } 
break



Posted by ellen at June 30, 2008 12:07 PM | TrackBack

 Comments
 Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



Recommended Reading