When editing a Fivestar field, the Target Node ID field accepts a static integer (such as 10) but not PHP code as described at http://drupal.org/handbook/modules/fivestar in the "Configuration as a CCK field / Advanced Rating" section.

When supplying PHP code for Target Node ID, such as:

return $node->field_whatever[0]['nid'];

or even

return 10;

leaves no result in the field_name_target field of the associated entry in content_type_name.

I believe the responsible code is in fivestar_field.inc's fivestar_field function:

At the end of the update case, $item['target'] is checked to be numeric, and if so the vote is recorded to the database - using the values in $item['target']. The following has made it work for me, however being not familiar with the Fivestar code, I am not sure how it should ideally be corrected.

This at least illustrated the problem - that the PHP code to be evaluated (what you put into the Target field) is in $item['target'], and the result of calling eval on it gets put in $items[$delta]['target'], while $item['target'] is sent on to the database.