Author: sevein
Date: Fri Sep 23 10:42:15 2011
New Revision: 9801
Log:
Check if item exists
Modified:
trunk/lib/model/QubitInformationObject.php
Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php Thu Sep 22 17:12:19 2011
(r9800)
+++ trunk/lib/model/QubitInformationObject.php Fri Sep 23 10:42:15 2011
(r9801)
@@ -1437,9 +1437,21 @@
{
$newNote = new QubitNote;
$newNote->setScope('QubitInformationObject');
- $newNote->setUserId($options['userId']);
- $newNote->setContent($options['note']);
- $newNote->setTypeId($options['noteTypeId']);
+
+ if (isset($options['userId']))
+ {
+ $newNote->setUserId($options['userId']);
+ }
+
+ if (isset($options['note']))
+ {
+ $newNote->setContent($options['note']);
+ }
+
+ if (isset($options['noteTypeId']))
+ {
+ $newNote->setTypeId($options['noteTypeId']);
+ }
$this->notes[] = $newNote;
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.