Custom Post Type and Taxonomy Rewrite Error

In order to avoid an error like this you’ll have to check whether or not the value of $glossary_letter is an array or not. Since get_the_terms() returns false on failure, you can just check whether or not $glossary_letter is false and set it to an empty array in order to appease array_pop() without getting that error.

<?php
add_filter('post_type_link', 'client_area_permalink', 10, 4);
function client_area_permalink($post_link, $post, $leavename, $sample) {
    if ( false !== strpos( $post_link, '%client_category%' ) ) {
        $glossary_letter = get_the_terms( $post->ID, 'client_category' );

        // adding check and reset
        if ( !$glossary_letter ) { $glossary_letter = array(); }
        // continue as you were

        $post_link = str_replace( '%client_category%', array_pop( $glossary_letter )->slug, $post_link );
    }
return $post_link;
}
?>