This issue occurs when you have a number component that isn't required, and a submission to the webform with the number field empty. On csv export you get this warning.

Simple patch here that fixes the issue. Related (sort of) to #1458330: Empty string number components throw PHP notice on display

Members fund testing for the Drupal project. Drupal Association Learn more


Liam Morland’s picture

I am not getting the error you report. Your patch would prevent a number of 0 being processed by number_format(). You may find is_numeric() to be a useful function for what you are trying to do, if the problem still exists.

acbramley’s picture

I can reproduce this error every time, after exporting the csv reload the page and you should see it (or have a look in the watchdog). This patch is better.

quicksketch’s picture

Status: Needs review » Fixed

Committed #2 to 6.x-3.x, 7.x-3.x, and 7.x-4.x. Thanks guys!

quicksketch’s picture

Though I am curious why this problem would ever happen... non-numeric data shouldn't really be in the number component's data. In any case this results in more robust code, so I'm not opposed to including it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.