Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
wp core verify-checksums fails for en_GB locale #2286
I have WP 4.3.1 (yes, will be upgrading to 4.4 shortly) and WP-CLI 0.21.1 installed on an en_GB locale WordPress system. wp-includes/version.php therefore has a different checksum from, say, the en_US locale because of the additional line at the end of the file:
$wp_local_package = 'en_GB';
However, if I then run this command from the Web tree root:
wp core verify-checksums
then I get this output:
Warning: File doesn't verify against checksum: wp-includes/version.php
I've md5sum'ed wp-includes/version.php and compared it with the md5 checksum here:
and it matches correctly, so wp-includes/version.php hasn't been modified.
Success: WordPress install verifies against checksums.
My suspicion is that WP_CLI 0.21.1 isn't checksumming non-en_US locales correctly.
My assumption here is that the old WP_CLI version correctly used $wp_local_package to determine the locale (falling back to en_US if it isn't set in wp-includes/version.php) whereas the latest WP_CLI just defaults to en_US only unless --locale is supplied.
This seems a downgrade in functionality because I'm now going to have to scan wp-includes/version.php myself to see if $wp_local_package is set and then supply --locale with the locale value if it is - a lot more work for the end user, IMHO. I suspect most users would expect the locale to default to the WordPress locale if --locale isn't supplied, so this is quite unexpected behaviour in the latest WP-CLI for anyone not in the en_US locale. The fact that an older WP_CLI did it correctly is also quite frustrating.
Sorry, my bad. Serves me to reply to Github issues on my phone :)
There's a bug in that we're checking the
I'll get this fixed, and then you can use