Some more notices (#5424)

This commit is contained in:
Michael Vogel
2018-07-20 20:07:54 +02:00
committed by Hypolite Petovan
parent 4f2ae88684
commit 7382be2766
6 changed files with 28 additions and 12 deletions

View File

@@ -185,7 +185,7 @@ class OnePoll
$ret = Network::curl($url);
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
if (!empty($ret["errno"]) && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
// set the last-update so we don't keep polling
DBA::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
Contact::markForArchival($contact);
@@ -321,7 +321,7 @@ class OnePoll
$ret = Network::curl($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
unlink($cookiejar);
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
if (!empty($ret["errno"]) && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
// set the last-update so we don't keep polling
DBA::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
Contact::markForArchival($contact);