Catchable fatal error: Object of class stdClass could not be converted to string

You don’t specify where exactly the error comes from but I assume your problem is that you assign an object to the slug instead of a string.
your code should look like

$t = array_shift( $terms );
$params['slug'] = $t->slug;

File not found.