mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
str_starts_with
This commit is contained in:
@@ -33,7 +33,7 @@ class xlswriter extends Extension
|
||||
SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir);
|
||||
$content = file_get_contents($this->source_dir . '/library/libxlsxwriter/src/theme.c');
|
||||
$bom = pack('CCC', 0xEF, 0xBB, 0xBF);
|
||||
if (substr($content, 0, 3) !== $bom) {
|
||||
if (!str_starts_with($content, $bom)) {
|
||||
file_put_contents($this->source_dir . '/library/libxlsxwriter/src/theme.c', $bom . $content);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user