Question: PHP Smarty keeps complaining since my variable money isn't a double that I cant use `money_format` on it, now I am trying to convert `$money` into a double, how do I do that?

```
$money = 100;
$money|string_format:"01.2f"|money_format:"%(#10n"

```

Answer: 
The question gives insufficient information to provide a complete answer.

The "bad adaptive filter type" message means that the PNG file is either corrupted or was generated by a buggy encoder.

Each scanline of a PNG file begins with a "filter type" byte which must be 0, 1, 2, 3, or 4.
I had this issue before, the image was corrupted by unknown reason, the solution of catching such an error can be using the code below (in Python):

```
try:
    Image.open(path).tobytes()
except IOError:
    print('detect error img %s' % path)
    continue

```