|
@@ -283,8 +283,13 @@ function chado_insert_property($record, $property, $options = array()) {
|
|
|
|
|
|
// First see if the property is already assigned to the record. I
|
|
|
$props = chado_get_property($record, $property);
|
|
|
- if (!is_array($props) and $props) {
|
|
|
- $props = array($props);
|
|
|
+ if (!is_array($props)) {
|
|
|
+ if ($props) {
|
|
|
+ $props = array($props);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $props = array();
|
|
|
+ }
|
|
|
}
|
|
|
if (count($props) > 0) {
|
|
|
// The property is already assigned, so, see if we should update it.
|