From 1b580a65d2ba7d0b6af40efbd7f4dd30c4f4540e Mon Sep 17 00:00:00 2001 From: Alex Z Date: Sat, 1 Nov 2008 00:00:25 +0000 Subject: [PATCH] (bug 16207) - Fix title protection in the API. $expiry is cast to an array near the start and doesn't have the correct timestamp format here anyway. --- includes/api/ApiProtect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index f6eb32c572..ecd09ebbd5 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -109,7 +109,7 @@ class ApiProtect extends ApiBase { $articleObj = new Article($titleObj); $ok = $articleObj->updateRestrictions($protections, $params['reason'], $params['cascade'], $expiryarray); } else - $ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiry); + $ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiryarray['create']); if(!$ok) // This is very weird. Maybe the article was deleted or the user was blocked/desysopped in the meantime? // Just throw an unknown error in this case, as it's very likely to be a race condition -- 2.20.1