Added is_object()
This commit is contained in:
@@ -137,7 +137,7 @@ class AppDelegation extends BaseAppDelegation {
|
||||
$con = Propel::getConnection(AppDelegationPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oAppDel = AppDelegationPeer::retrieveByPk( $AppUid, $sDelIndex );
|
||||
if ( get_class ($oAppDel) == 'AppDelegation' ) {
|
||||
if (is_object($oAppDel) && get_class ($oAppDel) == 'AppDelegation' ) {
|
||||
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
||||
return $aFields;
|
||||
@@ -163,7 +163,7 @@ class AppDelegation extends BaseAppDelegation {
|
||||
try {
|
||||
$con->begin();
|
||||
$oApp = AppDelegationPeer::retrieveByPK( $aData['APP_UID'], $aData['DEL_INDEX'] );
|
||||
if ( get_class ($oApp) == 'AppDelegation' ) {
|
||||
if (is_object($oApp) && get_class ($oApp) == 'AppDelegation' ) {
|
||||
$oApp->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($oApp->validate()) {
|
||||
$res = $oApp->save();
|
||||
@@ -193,7 +193,7 @@ class AppDelegation extends BaseAppDelegation {
|
||||
try {
|
||||
$oConnection->begin();
|
||||
$oApp = AppDelegationPeer::retrieveByPK( $sApplicationUID, $iDelegationIndex );
|
||||
if ( get_class ($oApp) == 'AppDelegation' ) {
|
||||
if (is_object($oApp) && get_class ($oApp) == 'AppDelegation' ) {
|
||||
$result = $oApp->delete();
|
||||
}
|
||||
$oConnection->commit();
|
||||
|
||||
@@ -93,7 +93,7 @@ class AppThread extends BaseAppThread {
|
||||
try {
|
||||
$con->begin();
|
||||
$oApp = AppThreadPeer::retrieveByPK( $aData['APP_UID'], $aData['APP_THREAD_INDEX'] );
|
||||
if ( get_class ($oApp) == 'AppThread' ) {
|
||||
if (is_object($oApp) && get_class ($oApp) == 'AppThread' ) {
|
||||
$oApp->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($oApp->validate()) {
|
||||
$res = $oApp->save();
|
||||
|
||||
@@ -733,7 +733,7 @@ class Event extends BaseEvent {
|
||||
function Exists ( $sUid ) {
|
||||
try {
|
||||
$oObj = EventPeer::retrieveByPk($sUid);
|
||||
return (get_class($oObj) == 'Event');
|
||||
return (is_object($oObj) && get_class($oObj) == 'Event');
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
|
||||
@@ -142,7 +142,7 @@ class Groupwf extends BaseGroupwf {
|
||||
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oPro = GroupwfPeer::retrieveByPk( $ProUid );
|
||||
if ( get_class ($oPro) == 'Groupwf' ) {
|
||||
if (is_object($oPro) && get_class ($oPro) == 'Groupwf' ) {
|
||||
$aFields = $oPro->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
||||
$aFields['GRP_TITLE'] = $oPro->getGrpTitle();
|
||||
@@ -170,7 +170,7 @@ class Groupwf extends BaseGroupwf {
|
||||
try {
|
||||
$con->begin();
|
||||
$oPro = GroupwfPeer::retrieveByPK( $aData['GRP_UID'] );
|
||||
if ( get_class ($oPro) == 'Groupwf' ) {
|
||||
if (is_object($oPro) && get_class ($oPro) == 'Groupwf' ) {
|
||||
$oPro->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($oPro->validate()) {
|
||||
if ( isset ( $aData['GRP_TITLE'] ) )
|
||||
@@ -234,7 +234,7 @@ class Groupwf extends BaseGroupwf {
|
||||
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oPro = GroupwfPeer::retrieveByPk( $GrpUid );
|
||||
if ( get_class ($oPro) == 'Groupwf' ) {
|
||||
if (is_object($oPro) && get_class ($oPro) == 'Groupwf' ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -302,7 +302,7 @@ class InputDocument extends BaseInputDocument {
|
||||
$con = Propel::getConnection(InputDocumentPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oObj = InputDocumentPeer::retrieveByPk( $sUid );
|
||||
if ( get_class ($oObj) == 'InputDocument' ) {
|
||||
if (is_object($oObj) && get_class ($oObj) == 'InputDocument' ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -781,7 +781,7 @@ class OutputDocument extends BaseOutputDocument {
|
||||
$con = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oObj = OutputDocumentPeer::retrieveByPk( $sUid );
|
||||
if ( get_class ($oObj) == 'OutputDocument' ) {
|
||||
if (is_object($oObj) && get_class ($oObj) == 'OutputDocument' ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -144,7 +144,7 @@ class ReportVar extends BaseReportVar {
|
||||
$con = Propel::getConnection(ReportVarPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oRepVarUid = ReportVarPeer::retrieveByPk( $sRepVarUid );
|
||||
if ( get_class ($oRepVarUid) == 'ReportVar' ) {
|
||||
if (is_object($oRepVarUid) && get_class ($oRepVarUid) == 'ReportVar' ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -180,7 +180,7 @@ function swimlanesElementsExists ( $sSwiEleUid ) {
|
||||
$con = Propel::getConnection(SwimlanesElementsPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oSwiEleUid = SwimlanesElementsPeer::retrieveByPk( $sSwiEleUid );
|
||||
if ( get_class ($oSwiEleUid) == 'SwimlanesElements' ) {
|
||||
if (is_object($oSwiEleUid) && get_class ($oSwiEleUid) == 'SwimlanesElements' ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user