Projekt

Allgemein

Profil

GX-Bug #67949 » direct_help_fallback_patch.patch

Moritz Bunjes, 19.11.2020 18:07

Unterschiede anzeigen:

src/GXModules/Gambio/DirectHelp/Admin/Classes/Storages/DirectHelpManualMappingFileStorage.inc.php (date 1605805088508)
1 1
<?php
2

  
3 2
/* --------------------------------------------------------------
4
   DirectHelpManualMappingFileStorage.inc.php 2018-10-02
3
   DirectHelpManualMappingFileStorage.inc.php 2020-11-19
5 4
   Gambio GmbH
6 5
   http://www.gambio.de
7
   Copyright (c) 2016 Gambio GmbH
6
   Copyright (c) 2020 Gambio GmbH
8 7
   Released under the GNU General Public License (Version 2)
9 8
   [http://www.gnu.org/licenses/gpl-2.0.html]
10 9
   --------------------------------------------------------------
......
182 181
        curl_setopt_array($request,
183 182
                          [
184 183
                              CURLOPT_URL            => $url,
185
                              CURLOPT_RETURNTRANSFER => true
184
                              CURLOPT_RETURNTRANSFER => true,
185
                              CURLOPT_CONNECTTIMEOUT => 5,
186
                              CURLOPT_TIMEOUT        => 5,
186 187
                          ]);
187 188
        
188 189
        $content    = curl_exec($request);
......
190 191
        
191 192
        curl_close($request);
192 193
        
193
        if ($statusCode === self::HTTP_NOT_FOUND_STATUS_CODE) {
194
        if ($statusCode === self::HTTP_NOT_FOUND_STATUS_CODE || strpos((string)$content, '"links"') === false) {
194 195
            $content = self::FALLBACK_CONTENT;
195 196
        }
196 197
        
(2-2/2)