mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +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);
|
SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir);
|
||||||
$content = file_get_contents($this->source_dir . '/library/libxlsxwriter/src/theme.c');
|
$content = file_get_contents($this->source_dir . '/library/libxlsxwriter/src/theme.c');
|
||||||
$bom = pack('CCC', 0xEF, 0xBB, 0xBF);
|
$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);
|
file_put_contents($this->source_dir . '/library/libxlsxwriter/src/theme.c', $bom . $content);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user