Issue is in the way you are printing the value. actually print
is just used for printing string, while print_r
is used for printing array or Object. so in your case when you use $node_author->field_custom
, then as it is an array, therefore it is not printing and giving you error. You can print it as below.
print_r($node_author->field_custom);
It will print the array, and will not give you error, however if you just want to print the value, then you can print somewhat like:
print $node_author->field_custom[LANGUAGE_NONE][0]['value'];
If above code doesnot work, then paste output of
print_r($node_author->field_custom);
It will give better approach.
//Edited
$image_url = file_create_url($node_author->field_custom[und][0]['uri']);
print render(theme_image($image_url));
Or
print render($node_author->field_custom);