get_adjacent_post – in same term not working

The arguments for get_adjacent_post is not formatted correctly. $excluded_terms needs to be either a string or an array. Also be careful with the category. If ‘portcats’ is a category name and not a taxonomy, that won’t work. This is looking for posts that are in the same ‘portcats’ taxomony with certain terms in ‘portcats’ excluded. The same category is provided by the first(if in multiple) category the current post is in.

$excluded_terms (array or string) (optional) Array or comma-separated
list of excluded term IDs.

<?php $prev_post = get_adjacent_post( true, '18,20,10,21,19,22,17', true, 'portcats' );  ?>