UnionOfRAD/lithium — pull request #367 by rmarscher (2012-03-09 01:39:07+00:00)
Title: Change Media encode decode default from false to null

Media handler defaults for encode and decode need to be null and not false. Media::encode checks for `!isset($handler['encode'])` to ignore the handler. A `false` value fails that check and then causes a fatal error - Function name must be a string - because it tries to invoke the `false` value.

Interesting to note that assertEqual on line 71 of tests/cases/net/http/MediaTests.php didn't fail because it was using `null` for 'encode' and 'decode' but the actual for those was `false` - the assertEqual doesn't pick up on the difference between `null` and `false`.

I also changed a line in the `MediaTest` unit test that might have caught this, but was using `assertEqual` instead of `assertIdentical`. Probably want to be careful about that since `assertEqual` doesn't pick up on a difference between `null` and `false`. There was also a line in MediaTest with 101 chars, so I broke that into multiple lines.