lox/pheasant — pull request #25 by bjornpost (2013-01-14 20:46:29+00:00)
Title: Allow empty relationships for hasOne and belongsTo

It's me again :). We're currently facing an issue which causes Pheasant to crash when we have an object with relationships (`hasOne`, `belongsTo`) defined, but the relationship is optional (so the foreign object could not exist). Pheasant throws an exception saying that there are not enough parameters to bind($sql) (Binder.php:114).

This commit (7a54181, don't know why Github also attaches the other 2) fixes that and makes a `hasOne` or `belongsTo` relationship optional by checking if the `local` variable exists.