BUG 6644 Resolved - Fixed

Problem when propel returns a valid object after a retrievebypk but with NULL value
Added a validation when propel object ahs correct classname but it is null
This commit is contained in:
Hugo Loza
2011-04-01 11:50:34 -04:00
parent 5a907636ee
commit 79b4020ef3
2 changed files with 9 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
/**
* Configuration.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
@@ -141,6 +141,6 @@ class Configuration extends BaseConfiguration {
public function exists($CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid)
{
$oRow = ConfigurationPeer::retrieveByPK( $CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid );
return (is_object($oRow) && get_class ($oRow) == 'Configuration');
return (( get_class ($oRow) == 'Configuration' )&&(!is_null($oRow)));
}
} // Configuration

View File

@@ -62,10 +62,10 @@ try {
$user = new Users;
$aUser = $user->loadByUsernameInArray($usr);
switch($aUser['USR_STATUS']){
case 'VACATION':
case 'VACATION':
G::SendTemporalMessage ('ID_USER_ONVACATION', "warning");
break;
CASE 'INACTIVE':
CASE 'INACTIVE':
G::SendTemporalMessage ('ID_USER_INACTIVE', "warning");
break;
}
@@ -122,7 +122,7 @@ try {
$oPluginRegistry =& PMPluginRegistry::getSingleton();
if ( $oPluginRegistry->existsTrigger ( PM_LOGIN ) ) {
$lSession="";
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
$oPluginRegistry->executeTriggers ( PM_LOGIN , $loginInfo );
}
@@ -131,8 +131,8 @@ try {
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
$RBAC->loadUserRolePermission($RBAC->sSystem, $_SESSION['USER_LOGGED']);
//$rol = $RBAC->rolesObj->load($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_UID']);
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
//$_SESSION['USR_ROLENAME'] = $rol['ROL_NAME'];
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
//$_SESSION['USR_ROLENAME'] = $rol['ROL_NAME'];
unset($_SESSION['FAILED_LOGINS']);
@@ -193,7 +193,7 @@ try {
$cput = serialize($_CSERVER);
if( !is_file(PATH_DATA_SITE . PATH_SEP . '.server_info') ){
file_put_contents(PATH_DATA_SITE . PATH_SEP . '.server_info', $cput);
}
}
else {
$c = file_get_contents(PATH_DATA_SITE . PATH_SEP . '.server_info');
if(md5($c) != md5($cput)){
@@ -246,7 +246,7 @@ try {
}
else {
$sLocation = $oUserProperty->redirectTo($_SESSION['USER_LOGGED'], $lang);
}
}
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->extJsInit = true;