Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LabNbook
LabNbook-Moodle
Commits
109061b8
Commit
109061b8
authored
Mar 26, 2019
by
Francois Gannaz
Browse files
API fetch: log the curl errors
parent
72794fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
classes/session.php
View file @
109061b8
...
...
@@ -230,8 +230,7 @@ class mod_labnbook_session
$response
=
curl_exec
(
$curl
);
$responseCode
=
curl_getinfo
(
$curl
,
CURLINFO_RESPONSE_CODE
);
if
(
$response
===
false
||
$responseCode
!=
200
)
{
// log the error?
// See curl_error($curl);
error_log
(
"Query
$verb
/
$urlPath
to labnbook API failed with http code
$responseCode
: "
.
curl_error
(
$curl
));
curl_close
(
$curl
);
return
$defaultValue
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment