-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: A non-numeric value encountered - language issue #600
Comments
Duplicate of #597 |
As I stated, from my point of view it's another issue. #597 drifted towards Alpine - this is about a decimals separator other than ".". |
Ping @AJenbo: can we use the solution from above? |
Afaik it will loose precision, but I can probably either set the local for the command or do propper parsing of the local specific format to get the correct value. I plan to work on it today so this is good timing 🙂 |
Thanks! |
Same issue? #606 |
@tomswinkels I believe so. |
Different issue than #597
Description:
Running on Valet on MacOS Mojave 10.14.4 - on a German system, and that's the issue.
exec ps axo %cpu,%mem,command
returns something like%CPU %MEM COMMAND
0,0 0,1 /sbin/launchd
0,0 0,0 /usr/sbin/syslogd
0,0 0,1 /usr/libexec/UserEventAgent (System)
The separator in German is a comma. Parsing that fails in SystemProcessCounter.
Steps To Reproduce:
"3,4" / 100 ==> "PHP Notice: A non well formed numeric value encountered"
Solution
Use "float":
return ['cpu' => (float) $row->first() / 100, 'mem' => (float) $row->last()];
The text was updated successfully, but these errors were encountered: