From cf954fac1e6afd1c8b72821852584292e4559547 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 4 Apr 2017 14:53:05 -0300 Subject: [PATCH] Fixed missing array declaration --- includes/abstracts/abstract-wc-rest-crud-controller.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-rest-crud-controller.php b/includes/abstracts/abstract-wc-rest-crud-controller.php index d81dbdece0b..6226351f002 100644 --- a/includes/abstracts/abstract-wc-rest-crud-controller.php +++ b/includes/abstracts/abstract-wc-rest-crud-controller.php @@ -471,7 +471,8 @@ abstract class WC_REST_CRUD_Controller extends WC_REST_Posts_Controller { * @return array */ public function get_collection_params() { - $params['context'] = $this->get_context_param(); + $params = array(); + $params['context'] = $this->get_context_param(); $params['context']['default'] = 'view'; $params['page'] = array(