From 365f2c69c7ece84191de46d06add106407d755d3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 20 May 2006 18:08:15 +0000 Subject: [PATCH] r833: - Changing the attachment.attachment type to be TYPE_BIN - Remove a warning in attachment.php --- attachment.php | 2 +- includes/api_attachment.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/attachment.php b/attachment.php index 8e347f2..414d27e 100755 --- a/attachment.php +++ b/attachment.php @@ -106,7 +106,7 @@ if ($_POST['do'] == 'insert') // mark obsoletes $obsoletes = $bugsys->input_clean('obsoletes', TYPE_UINT); - if (count($obsoletes) > 0) + if (is_array($obsoletes) AND sizeof($obsoletes) > 0) { $db->query("UPDATE " . TABLE_PREFIX . "attachment SET obsolete = 1 WHERE attachmentid IN (" . implode(',', $obsoletes) . ") AND !obsolete AND bugid = $bug[bugid]"); diff --git a/includes/api_attachment.php b/includes/api_attachment.php index e51ef2a..dcdee41 100644 --- a/includes/api_attachment.php +++ b/includes/api_attachment.php @@ -43,7 +43,7 @@ class AttachmentAPI extends API 'filename' => array(TYPE_STR, REQ_YES, 'verify_noempty'), 'mimetype' => array(TYPE_STR, REQ_YES), 'filesize' => array(TYPE_INT, REQ_NO), - 'attachment' => array(TYPE_NONE, REQ_YES), + 'attachment' => array(TYPE_BIN, REQ_YES), 'description' => array(TYPE_STR, REQ_YES), 'dateline' => array(TYPE_UINT, REQ_SET), 'userid' => array(TYPE_UINT, REQ_YES, null, array('includes/api_user.php', 'UserAPI')), -- 2.22.5