1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Merge pull request #2336 from lonalore/lib

Fix for library SSL error.
This commit is contained in:
Cameron
2017-01-27 18:04:06 -08:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -581,7 +581,15 @@ class e_file
if (function_exists('file_get_contents') && ini_get('allow_url_fopen'))
{
$old_timeout = e107_ini_set('default_socket_timeout', $timeout);
$data = file_get_contents($address);
$context = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
),
);
$data = file_get_contents($address, false, stream_context_create($context));
// $data = file_get_contents(htmlspecialchars($address)); // buggy - sometimes fails.
if ($old_timeout !== FALSE)

View File

@@ -1599,7 +1599,7 @@ class e_library_manager
// The library will be cached with version number, so this only run once per library.
if(substr($file, 0, 4) == 'http')
{
$content = file_get_contents($file);
$content = e107::getFile()->getRemoteContent($file);
$tmpFile = tempnam(sys_get_temp_dir(), 'lib_');
if($tmpFile)