From 59812567284d44b9248c32119cc4b860a1b856ee Mon Sep 17 00:00:00 2001 From: Guy Thomas Date: Thu, 19 Sep 2024 10:22:03 +0100 Subject: [PATCH] Issues #30: Fix warning where curl options are constants instead of strings when using moodle curl class --- classes/rest/api.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/rest/api.php b/classes/rest/api.php index 29eb4e3..427f144 100644 --- a/classes/rest/api.php +++ b/classes/rest/api.php @@ -206,11 +206,11 @@ protected function test_service_reachable($serviceuri) { $this->logger->info('Testing service availability: '.$serviceuri); $options = [ - CURLOPT_TIMEOUT => 15, - CURLOPT_CONNECTTIMEOUT => 15, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_SSL_VERIFYHOST => 0, - CURLOPT_SSL_VERIFYPEER => 0, + 'CURLOPT_TIMEOUT' => 15, + 'CURLOPT_CONNECTTIMEOUT' => 15, + 'CURLOPT_RETURNTRANSFER' => true, + 'CURLOPT_SSL_VERIFYHOST' => 0, + 'CURLOPT_SSL_VERIFYPEER' => 0, ]; $curl = new \curl(); $curl->setopt($options);