Created
December 19, 2011 16:55
-
-
Save docteurklein/1497965 to your computer and use it in GitHub Desktop.
avoid errors when binding empty propel collection to a symfony2 form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$callback = function($data = null) { | |
if (empty($data)) { | |
return new \PropelObjectCollection(); | |
} | |
return $data; | |
}; | |
$builder | |
->appendClientTransformer(new CallbackTransformer($callback, $callback)); | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
interesting, I've maybe done something wrong. I'l try to dig into that.