From 5125b95af59b87238957e315b19e6f390352b3b2 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 21 Sep 2020 12:05:36 +1000 Subject: [PATCH] PHP 8 Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. --- includes/cf-pro-client/classes/api/local/files.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/cf-pro-client/classes/api/local/files.php b/includes/cf-pro-client/classes/api/local/files.php index 2ffc5ebc9..36d45c86b 100644 --- a/includes/cf-pro-client/classes/api/local/files.php +++ b/includes/cf-pro-client/classes/api/local/files.php @@ -45,8 +45,8 @@ public function add_routes($namespace) */ public function key_check(\WP_REST_Request $request) { - $public = !empty($request[ 'public' ]) ? $request[ 'public' ] : !is_null($request->get_header('X-CS-PUBLIC')) ? $request->get_header('X-CS-PUBLIC') : null; - $token = !empty($request[ 'token' ]) ? $request[ 'token' ] : !is_null($request->get_header('X-CS-TOKEN')) ? $request->get_header('X-CS-TOKEN') : null; + $public = !empty($request[ 'public' ]) ? $request[ 'public' ] : ( !is_null($request->get_header('X-CS-PUBLIC')) ? $request->get_header('X-CS-PUBLIC') : null ); + $token = !empty($request[ 'token' ]) ? $request[ 'token' ] : ( !is_null($request->get_header('X-CS-TOKEN')) ? $request->get_header('X-CS-TOKEN') : null ); return caldera_forms_pro_compare_to_saved_keys($public, $token); }