0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-03-16 06:13:34 +00:00

US 2.6 fix

Fix for Project Template > Edit Button > Create Project > Enter Popup information and Save.
PHP Fatal error: Call to a member function format() on a non-object
This commit is contained in:
Haris Raheem 2017-04-14 20:05:20 +05:00 committed by GitHub
parent 4502f66472
commit 5a5a11e467

View file

@ -465,6 +465,9 @@ class Project extends SugarBean {
{
$dateformat = $current_user->getPreference('datef');
$startdate = DateTime::createFromFormat($dateformat, $project_start);
if($startdate == false)
$startdate = DateTime::createFromFormat('Y-m-d', $project_start);
$start = $startdate->format('Y-m-d');
}