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

ErrorException: A non-numeric value encountered #1689

Closed
peimn opened this Issue Dec 23, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@peimn

peimn commented Dec 23, 2017

Steps to reproduce

  1. Fill in contact form on default installation of Statamic but let Fav Number be empty
  2. Go to /forms and open Contact me
  3. Error appears

screen shot 2017-12-23 at 1 46 45 pm

Server Details

Operating System: macos

Web Server: nginx

PHP Version: 7.1

Statamic Version: 2.7.2

Updated from an older Statamic or fresh install: Fresh

List of installed addons:

Logs

If any logs (browser, server, or Statamic) are appropriate...

```
</details>
@peimn

This comment has been minimized.

peimn commented Dec 23, 2017

Solution:
/core/Forms/Metrics/SumMetric.php (L 14):
return (int)$submission->get($field);

/core/Forms/Metrics/AverageMetric.php (L 14):
return (int)$submission->get($field);

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Feb 19, 2018

Fixed for next release.

@jackmcdade jackmcdade closed this Feb 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment