mirror of
https://github.com/unraid/webgui.git
synced 2026-04-25 11:49:30 -05:00
Merge pull request #2010 from unraid/fix-warning-in-Wrappers-php
fix: PHP Warning in Wrappers.php
This commit is contained in:
@@ -214,10 +214,10 @@ function my_logger($message, $logger='webgui') {
|
||||
* Fetches URL and returns content
|
||||
* @param string $url The URL to fetch
|
||||
* @param array $opts Array of options to pass to curl_setopt()
|
||||
* @param array $getinfo Empty array passed by reference, will contain results of curl_getinfo and curl_error
|
||||
* @param ?array $getinfo Empty array passed by reference, will contain results of curl_getinfo and curl_error, or null if not needed
|
||||
* @return string|false $out The fetched content
|
||||
*/
|
||||
function http_get_contents(string $url, array $opts = [], array &$getinfo = NULL) {
|
||||
function http_get_contents(string $url, array $opts = [], ?array &$getinfo = NULL) {
|
||||
$ch = curl_init();
|
||||
if(isset($getinfo)) {
|
||||
curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user