From dbde443d4a7330b1d78ef8ac973405c46f50eed4 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 29 Dec 2005 02:07:10 +0000 Subject: [PATCH] More wp_upload_bits() fixes. git-svn-id: https://develop.svn.wordpress.org/trunk@3378 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-post.php | 2 +- xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 74a8ea065b..f9d036fada 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -932,7 +932,7 @@ function wp_upload_bits($name, $type, $bits) { // Compute the URL $url = $upload['url'] . "/$filename"; - return array('file' => $new_file, 'url' => $url); + return array('file' => $new_file, 'url' => $url, 'error' => false); } ?> diff --git a/xmlrpc.php b/xmlrpc.php index bac38e11a6..f3edb64430 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -853,7 +853,7 @@ class wp_xmlrpc_server extends IXR_Server { } $upload = wp_upload_bits($name, $type, $bits); - if ( $upload['error'] !== false ) { + if ( ! empty($upload['error']) ) { logIO('O', '(MW) Could not write file '.$name); return new IXR_Error(500, 'Could not write file '.$name); }