Skip to content

Conversation

wojsmol
Copy link
Contributor

@wojsmol wojsmol commented Mar 17, 2020

No description provided.

@wojsmol wojsmol requested a review from a team as a code owner March 17, 2020 17:24
@wojsmol wojsmol force-pushed the patch-1 branch 2 times, most recently from 5b2146f to ea1f614 Compare July 5, 2021 18:30
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
@swissspidy swissspidy self-requested a review July 7, 2021 15:29
@swissspidy swissspidy changed the title Add dicimal numbers to wp db size Add decimal numbers to wp db size Jul 7, 2021
@schlessera
Copy link
Member

@wojsmol Can you add a test that uses the --decimals flag, to make sure it works as intended?

@wojsmol
Copy link
Contributor Author

wojsmol commented Jul 7, 2021

@schlessera I added the test but it's failing for same reason.

Copy link
Member

@schlessera schlessera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work right now because the filter_var() a few lines below is stripping the period again.

I'd suggest doing the following (I can't provide it a s a suggestion here, so you;ll have to edit:

- WP_CLI::line( filter_var( $rows[0]['Size'], FILTER_SANITIZE_NUMBER_INT ) );
+ WP_CLI::line( str_replace( " {$size_format_display}", '', $rows[0]['Size'] ) );

wojsmol and others added 3 commits July 8, 2021 10:42
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
@wojsmol
Copy link
Contributor Author

wojsmol commented Jul 8, 2021

@schlessera Changes added.

@wojsmol wojsmol requested a review from schlessera July 8, 2021 09:07
@schlessera schlessera merged commit e27907e into wp-cli:master Jul 19, 2021
@schlessera schlessera added this to the 2.0.14 milestone Jul 19, 2021
@wojsmol wojsmol deleted the patch-1 branch July 19, 2021 14:36
danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants