From 1681e031f3bd97c187a5ee752029c0aed2de992e Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Thu, 8 Sep 2011 13:32:13 +0100 Subject: [PATCH] Fixed datastream state check. --- api/fedora_item.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index 683b31e6..07fa7ec2 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -800,7 +800,7 @@ class Fedora_Item { function set_datastream_state($dsid, $state, $log_message = 'Modified by Islandora API', $quiet = FALSE) { $valid_states = array('A', 'D', 'I'); - if (key_exists($state, $valid_states)) { + if (array_search($state, $valid_states) !== FALSE) { $params = array( 'pid' => $this->pid, 'dsID' => $dsid,