From abba40eaad1431487822c78c81e5e263a22e5d11 Mon Sep 17 00:00:00 2001 From: Alex Z Date: Sat, 13 Dec 2008 21:07:18 +0000 Subject: [PATCH] * (bug 16626) action=delete now correctly handles empty "reason" param --- RELEASE-NOTES | 1 + includes/api/ApiDelete.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8a1115c746..ede8c74e20 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -505,6 +505,7 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 16541) Added block expiry timestamp to list=logevents output * (bug 16613) action=protect doesn't tell when &cascade was set but cascading protection wasn't allowed +* (bug 16626) action=delete now correctly handles empty "reason" param === Languages updated in 1.14 === diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 16cae5b358..575a2590ba 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -161,7 +161,8 @@ class ApiDelete extends ApiBase { if( !FileDeleteForm::haveDeletableFile($file, $oldfile, $oldimage) ) return array(array('nofile')); - + if (is_null($reason)) # Log and RC don't like null reasons + $reason = ''; $status = FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress ); if( !$status->isGood() ) -- 2.20.1