Support

Account

Home Forums Front-end Issues Error calling a select with no value selected

Unread

Error calling a select with no value selected

  • I have a user field which is a multi-select. When I call it in author.php it works fine, but if no value was selected, it throws an error. I assume I am calling the field incorrectly and should conditionally call it only if values have been selected. This is the call I have:

    <?php echo '' . implode(', ', $curauth->my_custom_field) . "\n"; ?>

    What would be the correct way to call this so that it doesn’t throw an error when no values are selected?

    Please help!

    Thanks.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.