diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index dc1572637..7b3855533 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -1857,7 +1857,7 @@ public static function url_exists($url) { $curlopts[CURLOPT_FOLLOWLOCATION] = true; } $curlopts = array_replace($curlopts, self::CURLOPT_DEFAULT); - $curlopts = array_replace($curlopts, K_CURLOPTS); + $curlopts = array_replace($curlopts, (defined('K_CURLOPTS') ? K_CURLOPTS : [])); $curlopts = array_replace($curlopts, self::CURLOPT_FIXED); $curlopts[CURLOPT_URL] = $url; curl_setopt_array($crs, $curlopts); @@ -1992,7 +1992,7 @@ public static function fileGetContents($file) { $curlopts[CURLOPT_FOLLOWLOCATION] = true; } $curlopts = array_replace($curlopts, self::CURLOPT_DEFAULT); - $curlopts = array_replace($curlopts, K_CURLOPTS); + $curlopts = array_replace($curlopts, (defined('K_CURLOPTS') ? K_CURLOPTS : [])); $curlopts = array_replace($curlopts, self::CURLOPT_FIXED); $curlopts[CURLOPT_URL] = $url; curl_setopt_array($crs, $curlopts);