Skip to content

Commit

Permalink
Merge branch 'develop' into qual/phan.2024.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Feb 4, 2025
2 parents 2fcdd0b + b5ec082 commit 0077483
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dev/tools/phan/baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ return [
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
'htdocs/don/document.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/don/info.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/don/list.php' => ['PhanTypeMismatchProperty'],
'htdocs/don/list.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'],
'htdocs/don/note.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/ecm/class/ecmfiles.class.php' => ['PhanTypeMismatchArgument'],
Expand Down
14 changes: 12 additions & 2 deletions htdocs/comm/action/class/ical.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Copyright (C) 2013-2014 Laurent Destailleur <[email protected]>
* Copyright (C) 2012 Regis Houssin <[email protected]>
* Copyright (C) 2019-2024 Frédéric France <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024 Vincent de Grandpré <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -96,7 +97,16 @@ public function read_file($file)
$file_text = '';

//$tmpresult = getURLContent($file, 'GET', '', 1, [], ['http', 'https'], 2, 0); // To test with any URL
$tmpresult = getURLContent($file, 'GET');
$localip = 0;
$sslverify = -1;
if (getDolGlobalString('AGENDA_EXT_CALENDAR_IP_MODE')) {
$localip = intval(getDolGlobalString('AGENDA_EXT_CALENDAR_IP_MODE'));
}
if (getDolGlobalString('AGENDA_EXT_CALENDAR_SSLVERIFY_MODE')) {
$sslverify = intval(getDolGlobalString('AGENDA_EXT_CALENDAR_SSLVERIFY_MODE'));
}
// See documentation of getURLContent function for $localip and $sslverify possible values
$tmpresult = getURLContent($file, 'GET', '', 1, [], ['http', 'https'], $localip, $sslverify);
if ($tmpresult['http_code'] != 200) {
$file_text = null;
$this->error = 'Error: '.$tmpresult['http_code'].' '.$tmpresult['content'];
Expand Down

0 comments on commit 0077483

Please sign in to comment.