Check for error codes returned from application::create() and version::create()
This commit is contained in:
@@ -13,11 +13,18 @@ function create_version_and_parent_app($sId = "")
|
|||||||
{
|
{
|
||||||
$oApp = new application();
|
$oApp = new application();
|
||||||
$oApp->sName = "OM App ".$sId;
|
$oApp->sName = "OM App ".$sId;
|
||||||
$oApp->create();
|
if(!$oApp->create())
|
||||||
|
{
|
||||||
|
error("oApp->create() failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
$oVersion = new version();
|
$oVersion = new version();
|
||||||
$oVersion->sName = "OM version ".$sId;
|
$oVersion->sName = "OM version ".$sId;
|
||||||
$oVersion->iAppId = $oApp->iAppId;
|
$oVersion->iAppId = $oApp->iAppId;
|
||||||
$oVersion->create();
|
if(!$oVersion->create())
|
||||||
|
{
|
||||||
|
error("oVersion->create() failed");
|
||||||
|
}
|
||||||
return $oVersion->iVersionId;
|
return $oVersion->iVersionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user