Merge pull request #2010 from unraid/fix-warning-in-Wrappers-php

fix: PHP Warning in Wrappers.php
This commit is contained in:
tom mortensen
2025-02-11 13:03:30 -08:00
committed by GitHub
+2 -2
View File
@@ -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);