Added is_object()
This commit is contained in:
@@ -318,7 +318,7 @@ class pagedTable
|
|||||||
else
|
else
|
||||||
trigger_Error('Warning: sql query is empty',E_USER_WARNING);
|
trigger_Error('Warning: sql query is empty',E_USER_WARNING);
|
||||||
// Config attributes from XMLFORM file
|
// Config attributes from XMLFORM file
|
||||||
$myAttributes=get_class_vars(is_object($this) && get_class($this));
|
$myAttributes=get_class_vars(get_class($this));
|
||||||
foreach ($this->xmlForm->xmlform->tree->attribute as $atrib => $value)
|
foreach ($this->xmlForm->xmlform->tree->attribute as $atrib => $value)
|
||||||
if (array_key_exists( $atrib, $myAttributes)){
|
if (array_key_exists( $atrib, $myAttributes)){
|
||||||
eval('settype($value,gettype($this->'.$atrib.'));');
|
eval('settype($value,gettype($this->'.$atrib.'));');
|
||||||
@@ -637,8 +637,8 @@ class pagedTable
|
|||||||
$this->xmlForm->setDefaultValues();
|
$this->xmlForm->setDefaultValues();
|
||||||
$this->xmlForm->setValues( $result );
|
$this->xmlForm->setValues( $result );
|
||||||
$this->xmlForm->fields[ $this->fields[$r]['Name'] ]->mode = 'view';
|
$this->xmlForm->fields[ $this->fields[$r]['Name'] ]->mode = 'view';
|
||||||
if ((array_search( 'rendergrid', get_class_methods(is_object($this) && get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)
|
if ((array_search( 'rendergrid', get_class_methods( get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)
|
||||||
||(array_search( 'renderGrid', get_class_methods(is_object($this) && get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)) {
|
||(array_search( 'renderGrid', get_class_methods( get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)) {
|
||||||
$htmlField = $this->xmlForm->fields[ $this->fields[$r]['Name'] ]->renderGrid( array($value) , $this->xmlForm );
|
$htmlField = $this->xmlForm->fields[ $this->fields[$r]['Name'] ]->renderGrid( array($value) , $this->xmlForm );
|
||||||
$this->tpl->assign( "value" , $htmlField[0] );
|
$this->tpl->assign( "value" , $htmlField[0] );
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class WebResource
|
|||||||
if (!function_exists('json_encode')) {
|
if (!function_exists('json_encode')) {
|
||||||
G::LoadThirdParty('pear/json','class.json');
|
G::LoadThirdParty('pear/json','class.json');
|
||||||
function json_encode(&$value) {
|
function json_encode(&$value) {
|
||||||
$json=& new Services_JSON;
|
$json= new Services_JSON;
|
||||||
return $json->encode($value);
|
return $json->encode($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ if (!function_exists('json_encode')) {
|
|||||||
if (!function_exists('json_decode')) {
|
if (!function_exists('json_decode')) {
|
||||||
G::LoadThirdParty('pear/json','class.json');
|
G::LoadThirdParty('pear/json','class.json');
|
||||||
function json_decode(&$value) {
|
function json_decode(&$value) {
|
||||||
$json=& new Services_JSON;
|
$json= new Services_JSON;
|
||||||
return $json->decode($value);
|
return $json->decode($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ class ymlTestCases
|
|||||||
{
|
{
|
||||||
$results=array();
|
$results=array();
|
||||||
//$this->addToPlan( $count, $start );
|
//$this->addToPlan( $count, $start );
|
||||||
$functions=get_class_methods(is_object($testerObject) && get_class($testerObject) );
|
$functions=get_class_methods( get_class($testerObject) );
|
||||||
foreach($functions as $id=>$fn)
|
foreach($functions as $id=>$fn)
|
||||||
$functions[$id]=strtolower($fn);
|
$functions[$id]=strtolower($fn);
|
||||||
foreach($this->testCases as $index => $testCase){
|
foreach($this->testCases as $index => $testCase){
|
||||||
|
|||||||
4
gulliver/thirdparty/pear/PEAR/Autoloader.php
vendored
4
gulliver/thirdparty/pear/PEAR/Autoloader.php
vendored
@@ -38,7 +38,7 @@ require_once "PEAR.php";
|
|||||||
* methods, an instance of each class providing separated methods is
|
* methods, an instance of each class providing separated methods is
|
||||||
* stored and called every time the aggregated method is called.
|
* stored and called every time the aggregated method is called.
|
||||||
*
|
*
|
||||||
* @author Stig S<>ther Bakken <ssb@php.net>
|
* @author Stig S<>ther Bakken <ssb@php.net>
|
||||||
*/
|
*/
|
||||||
class PEAR_Autoloader extends PEAR
|
class PEAR_Autoloader extends PEAR
|
||||||
{
|
{
|
||||||
@@ -146,7 +146,7 @@ class PEAR_Autoloader extends PEAR
|
|||||||
$classname = strtolower($classname);
|
$classname = strtolower($classname);
|
||||||
reset($this->_method_map);
|
reset($this->_method_map);
|
||||||
while (list($method, $obj) = each($this->_method_map)) {
|
while (list($method, $obj) = each($this->_method_map)) {
|
||||||
if (get_class($obj) == $classname) {
|
if (is_object($obj) && get_class($obj) == $classname) {
|
||||||
unset($this->_method_map[$method]);
|
unset($this->_method_map[$method]);
|
||||||
$ok = true;
|
$ok = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Systems extends BaseSystems {
|
|||||||
$con = Propel::getConnection(SystemsPeer::DATABASE_NAME);
|
$con = Propel::getConnection(SystemsPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oSystem = SystemsPeer::retrieveByPk( $SysUid );
|
$oSystem = SystemsPeer::retrieveByPk( $SysUid );
|
||||||
if ( get_class ($oSystem) == 'Systems' ) {
|
if (is_object($oSystem) && get_class ($oSystem) == 'Systems' ) {
|
||||||
$aFields = $oSystem->toArray(BasePeer::TYPE_FIELDNAME);
|
$aFields = $oSystem->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
||||||
return $aFields;
|
return $aFields;
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class AppDelegation extends BaseAppDelegation {
|
|||||||
$con = Propel::getConnection(AppDelegationPeer::DATABASE_NAME);
|
$con = Propel::getConnection(AppDelegationPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oAppDel = AppDelegationPeer::retrieveByPk( $AppUid, $sDelIndex );
|
$oAppDel = AppDelegationPeer::retrieveByPk( $AppUid, $sDelIndex );
|
||||||
if ( get_class ($oAppDel) == 'AppDelegation' ) {
|
if (is_object($oAppDel) && get_class ($oAppDel) == 'AppDelegation' ) {
|
||||||
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME);
|
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME);
|
||||||
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
||||||
return $aFields;
|
return $aFields;
|
||||||
@@ -163,7 +163,7 @@ class AppDelegation extends BaseAppDelegation {
|
|||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$oApp = AppDelegationPeer::retrieveByPK( $aData['APP_UID'], $aData['DEL_INDEX'] );
|
$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 );
|
$oApp->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($oApp->validate()) {
|
if ($oApp->validate()) {
|
||||||
$res = $oApp->save();
|
$res = $oApp->save();
|
||||||
@@ -193,7 +193,7 @@ class AppDelegation extends BaseAppDelegation {
|
|||||||
try {
|
try {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
$oApp = AppDelegationPeer::retrieveByPK( $sApplicationUID, $iDelegationIndex );
|
$oApp = AppDelegationPeer::retrieveByPK( $sApplicationUID, $iDelegationIndex );
|
||||||
if ( get_class ($oApp) == 'AppDelegation' ) {
|
if (is_object($oApp) && get_class ($oApp) == 'AppDelegation' ) {
|
||||||
$result = $oApp->delete();
|
$result = $oApp->delete();
|
||||||
}
|
}
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class AppThread extends BaseAppThread {
|
|||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$oApp = AppThreadPeer::retrieveByPK( $aData['APP_UID'], $aData['APP_THREAD_INDEX'] );
|
$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 );
|
$oApp->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($oApp->validate()) {
|
if ($oApp->validate()) {
|
||||||
$res = $oApp->save();
|
$res = $oApp->save();
|
||||||
|
|||||||
@@ -733,7 +733,7 @@ class Event extends BaseEvent {
|
|||||||
function Exists ( $sUid ) {
|
function Exists ( $sUid ) {
|
||||||
try {
|
try {
|
||||||
$oObj = EventPeer::retrieveByPk($sUid);
|
$oObj = EventPeer::retrieveByPk($sUid);
|
||||||
return (get_class($oObj) == 'Event');
|
return (is_object($oObj) && get_class($oObj) == 'Event');
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
catch (Exception $oError) {
|
||||||
throw($oError);
|
throw($oError);
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class Groupwf extends BaseGroupwf {
|
|||||||
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oPro = GroupwfPeer::retrieveByPk( $ProUid );
|
$oPro = GroupwfPeer::retrieveByPk( $ProUid );
|
||||||
if ( get_class ($oPro) == 'Groupwf' ) {
|
if (is_object($oPro) && get_class ($oPro) == 'Groupwf' ) {
|
||||||
$aFields = $oPro->toArray(BasePeer::TYPE_FIELDNAME);
|
$aFields = $oPro->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray ($aFields, BasePeer::TYPE_FIELDNAME );
|
||||||
$aFields['GRP_TITLE'] = $oPro->getGrpTitle();
|
$aFields['GRP_TITLE'] = $oPro->getGrpTitle();
|
||||||
@@ -170,7 +170,7 @@ class Groupwf extends BaseGroupwf {
|
|||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$oPro = GroupwfPeer::retrieveByPK( $aData['GRP_UID'] );
|
$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 );
|
$oPro->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||||
if ($oPro->validate()) {
|
if ($oPro->validate()) {
|
||||||
if ( isset ( $aData['GRP_TITLE'] ) )
|
if ( isset ( $aData['GRP_TITLE'] ) )
|
||||||
@@ -234,7 +234,7 @@ class Groupwf extends BaseGroupwf {
|
|||||||
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
$con = Propel::getConnection(GroupwfPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oPro = GroupwfPeer::retrieveByPk( $GrpUid );
|
$oPro = GroupwfPeer::retrieveByPk( $GrpUid );
|
||||||
if ( get_class ($oPro) == 'Groupwf' ) {
|
if (is_object($oPro) && get_class ($oPro) == 'Groupwf' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ class InputDocument extends BaseInputDocument {
|
|||||||
$con = Propel::getConnection(InputDocumentPeer::DATABASE_NAME);
|
$con = Propel::getConnection(InputDocumentPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oObj = InputDocumentPeer::retrieveByPk( $sUid );
|
$oObj = InputDocumentPeer::retrieveByPk( $sUid );
|
||||||
if ( get_class ($oObj) == 'InputDocument' ) {
|
if (is_object($oObj) && get_class ($oObj) == 'InputDocument' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -781,7 +781,7 @@ class OutputDocument extends BaseOutputDocument {
|
|||||||
$con = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);
|
$con = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oObj = OutputDocumentPeer::retrieveByPk( $sUid );
|
$oObj = OutputDocumentPeer::retrieveByPk( $sUid );
|
||||||
if ( get_class ($oObj) == 'OutputDocument' ) {
|
if (is_object($oObj) && get_class ($oObj) == 'OutputDocument' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class ReportVar extends BaseReportVar {
|
|||||||
$con = Propel::getConnection(ReportVarPeer::DATABASE_NAME);
|
$con = Propel::getConnection(ReportVarPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oRepVarUid = ReportVarPeer::retrieveByPk( $sRepVarUid );
|
$oRepVarUid = ReportVarPeer::retrieveByPk( $sRepVarUid );
|
||||||
if ( get_class ($oRepVarUid) == 'ReportVar' ) {
|
if (is_object($oRepVarUid) && get_class ($oRepVarUid) == 'ReportVar' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ function swimlanesElementsExists ( $sSwiEleUid ) {
|
|||||||
$con = Propel::getConnection(SwimlanesElementsPeer::DATABASE_NAME);
|
$con = Propel::getConnection(SwimlanesElementsPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oSwiEleUid = SwimlanesElementsPeer::retrieveByPk( $sSwiEleUid );
|
$oSwiEleUid = SwimlanesElementsPeer::retrieveByPk( $sSwiEleUid );
|
||||||
if ( get_class ($oSwiEleUid) == 'SwimlanesElements' ) {
|
if (is_object($oSwiEleUid) && get_class ($oSwiEleUid) == 'SwimlanesElements' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
$response = $oJasper->ws_list("/");
|
$response = $oJasper->ws_list("/");
|
||||||
|
|
||||||
if (get_class($response) == 'SOAP_Fault') {
|
if (is_object($response) && get_class($response) == 'SOAP_Fault') {
|
||||||
$errorMessage = $response->getFault()->faultstring;
|
$errorMessage = $response->getFault()->faultstring;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
$result = $oJasper->ws_runReport($currentUri, $report_params, $output_params, $attachments);
|
$result = $oJasper->ws_runReport($currentUri, $report_params, $output_params, $attachments);
|
||||||
|
|
||||||
// 4.
|
// 4.
|
||||||
if (get_class($result) == 'SOAP_Fault') {
|
if (is_object($result) && get_class($result) == 'SOAP_Fault') {
|
||||||
$errorMessage = $result->getFault()->faultstring;
|
$errorMessage = $result->getFault()->faultstring;
|
||||||
|
|
||||||
echo $errorMessage;
|
echo $errorMessage;
|
||||||
|
|||||||
Reference in New Issue
Block a user