Fixing names_hash_changed(..) so that it writes hex summ instead of binary one
Publish PHP Package / docker (push) Successful in 6s Details

This commit is contained in:
Pavel Shevaev 2025-01-21 17:38:27 +03:00
parent 720d851a23
commit 616c2c46d1
1 changed files with 1 additions and 1 deletions

View File

@ -1200,7 +1200,7 @@ function names_hash_changed(string $crc_file, array $names) : bool
$ctx = hash_init('crc32'); $ctx = hash_init('crc32');
foreach($names as $name) foreach($names as $name)
hash_update($ctx, $name); hash_update($ctx, $name);
$names_crc = hash_final($ctx, true); $names_crc = hash_final($ctx, false);
$changed = !file_exists($crc_file) || ensure_read($crc_file) != $names_crc; $changed = !file_exists($crc_file) || ensure_read($crc_file) != $names_crc;
ensure_write($crc_file, $names_crc); ensure_write($crc_file, $names_crc);
return $changed; return $changed;