From 90d762ee58385c831240eb5b82e15f670ef25e6b Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Sat, 27 Mar 2021 23:30:48 -0700
Subject: [PATCH] PHP compat

---
 inc/class-wp-revisions-control.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inc/class-wp-revisions-control.php b/inc/class-wp-revisions-control.php
index 4dc419c..d747f7c 100644
--- a/inc/class-wp-revisions-control.php
+++ b/inc/class-wp-revisions-control.php
@@ -555,7 +555,7 @@ class WP_Revisions_Control {
 			'wp-revisions-control/v1',
 			'schedule/(?P<id>[\d]+)',
 			array(
-				'methods'              => 'PUT',
+				'methods'             => 'PUT',
 				'callback'            => array( $this, 'rest_api_schedule_purge' ),
 				'permission_callback' => array( $this, 'rest_api_permission_callback' ),
 				'args'                => array(
@@ -565,6 +565,7 @@ class WP_Revisions_Control {
 						'validate_callback' => array( $this, 'rest_api_validate_id' ),
 					),
 				),
+				'show_in_index'       => false,
 			)
 		);
 	}
@@ -602,9 +603,9 @@ class WP_Revisions_Control {
 		$result = wp_schedule_single_event(
 			time() + 3,
 			$this->cron_action,
-			[
+			array(
 				$request->get_param( 'id' ),
-			]
+			)
 		);
 
 		return rest_ensure_response( $result );
-- 
GitLab