v1.1.1
This commit is contained in:
parent
92d56fe84d
commit
7dd3eeaa8a
97 changed files with 4912 additions and 1581 deletions
|
|
@ -286,7 +286,11 @@ function robotstxt_docmd_get_file_content( string $owner, string $repo, string $
|
|||
|
||||
// Decode content (GitHub returns base64).
|
||||
if ( 'base64' === $data['encoding'] ) {
|
||||
return base64_decode( $data['content'] ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
||||
$decoded = base64_decode( $data['content'], true ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
||||
if ( false === $decoded ) {
|
||||
return new WP_Error( 'decode_failed', __( 'Failed to decode file content from GitHub.', 'robotstxt-documentation-markdown' ) );
|
||||
}
|
||||
return $decoded;
|
||||
}
|
||||
|
||||
return $data['content'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue