BKWLD / reporter

Generate styled logs of Laravel requests that include application timing, memory usage, input data, and sql queries
30 stars 1 forks source link

Reporter/Formatter.php explodes if query takes > 999 ms #11

Closed lofye closed 11 years ago

lofye commented 11 years ago

MySQL will say the duration was "1,542" ms and the comma makes number_format explode.

Try this on line 114 of Formatter.php $query['time'] = str_replace(',', '', $query['time']);

or filter the time somewhere earlier.

weotch commented 11 years ago

I'm gonna see if i can make it smarter about other region's numbering conventions. Can you run php's localeconv() function and paste the output here? Hoping I can use it to detect what to expect.

lofye commented 11 years ago

{ "decimal_point":".", "thousands_sep":"", "int_curr_symbol":"", "currency_symbol":"", "mon_decimal_point":"", "mon_thousands_sep":"", "positive_sign":"", "negative_sign":"", "int_frac_digits":127, "frac_digits":127, "p_cs_precedes":127, "p_sep_by_space":127, "n_cs_precedes":127, "n_sep_by_space":127, "p_sign_posn":127, "n_sign_posn":127, "grouping":[ ], "mon_grouping":[ ] }

php 5.4.12, apache 2.2.15, centos 6.4

weotch commented 11 years ago

@lofye Do a composer update to grab the fix for this. Thanks for reporting it!

lofye commented 11 years ago

thanks for fixing it!

On 23 October 2013 10:24, Robert Reinhard notifications@github.com wrote:

@lofye https://github.com/lofye Do a composer update to grab the fix for this. Thanks for reporting it!

— Reply to this email directly or view it on GitHubhttps://github.com/BKWLD/reporter/issues/11#issuecomment-26909041 .