mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 12:36:23 +05:30
fix no https wrapper errors
This commit is contained in:
parent
4e18083722
commit
1b5e52e497
1 changed files with 7 additions and 1 deletions
|
|
@ -59,7 +59,11 @@ class Updater
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$fileContent = file_get_contents($path,false, stream_context_create(
|
if(!in_array('https', stream_get_wrappers()))
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
$fileContent = @file_get_contents($path,false, stream_context_create(
|
||||||
array(
|
array(
|
||||||
'http' => array(
|
'http' => array(
|
||||||
'header'=>"User-Agent: Awesome-Update-My-Self\r\n"
|
'header'=>"User-Agent: Awesome-Update-My-Self\r\n"
|
||||||
|
|
@ -80,6 +84,8 @@ class Updater
|
||||||
|
|
||||||
public function updateAble()
|
public function updateAble()
|
||||||
{
|
{
|
||||||
|
if(!in_array('https', stream_get_wrappers()))
|
||||||
|
return false;
|
||||||
if(empty($this->infos))
|
if(empty($this->infos))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue