diff --git a/core/datamodel.core.xml b/core/datamodel.core.xml index cbc3c329c..3606d3299 100644 --- a/core/datamodel.core.xml +++ b/core/datamodel.core.xml @@ -4,8 +4,10 @@ REST Services User - Only users having this profile are allowed to use the REST Web Services (unless 'secure_rest_services' is set to false in the configuration file). - + Only users having this profile are allowed to use the REST Web Services (unless 'secure_rest_services' is set to false + in the configuration file). + + diff --git a/core/dbobject.class.php b/core/dbobject.class.php index b8184778e..b68da7eb4 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -3699,16 +3699,14 @@ abstract class DBObject implements iDisplay // save current object values in case of an action failure (in memory rollback) $aBackupValues = array(); - foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) - { - $value = $this->m_aCurrValues[$sAttCode]; - if (is_object($value)) - { - $aBackupValues[$sAttCode] = clone $value; - } - else - { - $aBackupValues[$sAttCode] = $value; + foreach (MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) { + if (isset($this->m_aCurrValues[$sAttCode])) { + $value = $this->m_aCurrValues[$sAttCode]; + if (is_object($value)) { + $aBackupValues[$sAttCode] = clone $value; + } else { + $aBackupValues[$sAttCode] = $value; + } } } diff --git a/test/core/OQLTest.php b/test/core/OQLTest.php index 32882a0ef..d7b3939a3 100644 --- a/test/core/OQLTest.php +++ b/test/core/OQLTest.php @@ -212,31 +212,6 @@ class OQLTest extends ItopDataTestCase ); } - /** - * @dataProvider TypeErrorQueryProvider - * @depends testOQLSetup - * - * @param $sQuery - * - * @expectedException \CoreException - * - * @throws \OQLException - */ - public function testTypeErrorQueryParser($sQuery) - { - $this->debug($sQuery); - $oOql = new OqlInterpreter($sQuery); - $oOql->ParseQuery(); - } - - public function TypeErrorQueryProvider() - { - return array( - array('SELECT A WHERE A.a MATCHES toto'), - ); - } - - /** * Needs actual datamodel * @depends testOQLSetup