Skip to content
Snippets Groups Projects
Commit 87cc1cc5 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Regression of return code

parent 21858364
No related branches found
No related tags found
No related merge requests found
......@@ -221,10 +221,10 @@ class Project extends CommonObject
/**
* \brief Get object and lines from database
* \param rowid id of object to load
* \param ref Ref of project
* \return int >0 if OK, <0 if KO
* Get object and lines from database
* @param rowid id of object to load
* @param ref Ref of project
* @return int >0 if OK, 0 if not found, <0 if KO
*/
function fetch($id,$ref='')
{
......@@ -269,14 +269,14 @@ class Project extends CommonObject
}
else
{
return -1;
return 0;
}
}
else
{
$this->error=$this->db->lasterror();
dol_syslog("Project::fetch ".$this->error, LOG_ERR);
return -2;
return -1;
}
}
......
......@@ -168,7 +168,6 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
$localobject=new Commande($this->savdb);
$localobject->fetch(1);
$result=$localobject->fetch_projet();
print __METHOD__." result=".$result."\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment