I just checked and it seems that while zsh supports the pre-POSIX behavior of "test -t" using fd 1, both dash and bash treat "-t" as a string by default when there is no fd specified. So I think this change is fine.
OK millert@ for your revised dif if you add the missing ';' after the "return 0". - todd