diff --git a/includes/class-indieauth-debug.php b/includes/class-indieauth-debug.php index f433291..fdd14d0 100644 --- a/includes/class-indieauth-debug.php +++ b/includes/class-indieauth-debug.php @@ -48,7 +48,7 @@ public function log_rest_api_errors( $result, $server, $request ) { $headers = $request->get_headers(); $token = isset( $headers['authorization'] ) ? 'Present' : 'Absent'; $data = $result->get_data(); - if ( isset( $data['access_token'] ) ) { + if ( is_array( $data ) && isset( $data['access_token'] ) ) { // Remove actual token from logs $data['access_token'] = 'XXXX'; }