Warning: array_pop() expects parameter 1 to be array, boolean given

get_the_terms() will return a boolean false under some circumstances:

A post with no terms assigned gives a false result, not an empty
array.

https://codex.wordpress.org/Function_Reference/get_the_terms#Returns

It sounds like that is what is happening. You need to check that $post_link = to ensure that it is the type you expect before trying to use it.