From 7466f07f7087f2e6e15ba89b3a5f37abbad3fda3 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Thu, 30 Sep 2021 17:30:20 +0300 Subject: [PATCH] fix certificate error file_get_content --- .../visiosoft/advs-module/src/Adv/AdvRepository.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index cea08a2ce..7e9277833 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -312,7 +312,15 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface if (!$thumbnail AND $ext[1] != 'svg') { // Create thumbnail image - $image = Image::make(file_get_contents($adv->files[0]->make()->url())); + + $arrContextOptions=array( + "ssl"=>array( + "verify_peer"=>false, + "verify_peer_name"=>false, + ), + ); + + $image = Image::make(file_get_contents($adv->files[0]->make()->url(), false, stream_context_create($arrContextOptions))); $image->resize( null, setting_value('visiosoft.module.advs::thumbnail_height'),