mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
str_starts_with
This commit is contained in:
parent
01887d652c
commit
ada203c00c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user