racke / Template-Flute

Template::Flute - Modern designer-friendly HTML templating Engine
Other
11 stars 12 forks source link

Currency filter needs check if values exist #25

Closed hexfusion closed 10 years ago

hexfusion commented 10 years ago

In the case that no currency values are passed to the filter you get a uninitialized value from Number::Format. So we need a little check in init if hash value exists.

hexfusion commented 10 years ago

if (%args) I think would do it.

racke commented 10 years ago

The problem is that an application should never pass undefined values to the currency filter. It has to be a numeric value. However, I noticed in some cases we seem to have empty "ghost" records in lists, which I couldn't nail down and which are causing a crash. So if you want you can implement a strict configuration similar to what the date filter does in Flute.

racke commented 10 years ago

Problem fixed.