From 45de3f6e6ba95bc19b35287fb7e8b42ce11fdb9b Mon Sep 17 00:00:00 2001 From: Wayne Rocha <62760711+WayneRocha@users.noreply.github.com> Date: Tue, 14 Apr 2026 13:53:40 -0300 Subject: [PATCH] Update K_CURLOPTS usage with defined check --- include/tcpdf_static.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);