mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 11:21:59 +00:00
currency: Do not run strip_tags on api.github.com output
The output of api.github.com is JSON, thus we should not remove every <...> for it. For example, strip_tags had trimmed the JSON for shadow-4.14.1, leading to "Attempt to read property "tag_name" on null".
This commit is contained in:
parent
d42ea8f08d
commit
c39bfe9b33
@ -85,8 +85,9 @@ function http_get_file( $url )
|
||||
|
||||
exec( "curl --location --silent --max-time 30 $url", $dir );
|
||||
|
||||
$s = implode( "\n", $dir );
|
||||
$dir = strip_tags( $s );
|
||||
$dir = implode( "\n", $dir );
|
||||
if ( !preg_match( "/api.github.com/", $url) )
|
||||
$dir = strip_tags( $dir );
|
||||
return explode( "\n", $dir );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user