# Use of \\blx@imc@printtext doesn't match its definition

I just upgraded from Ubuntu 16 to 18, and now my LaTeX file (which has lots of biblatex/biber stuff) does this. What is the error?

! Use of \\blx@imc@printtext doesn't match its definition.
\text@command #1->\def \reserved@a {
#1}\ifx \reserved@a \@empty \let \check@...
l.692 ...rding to \textcite[288]{Kirby:traveller},
this hall is named from t...


Following a bug report about this issue (https://github.com/plk/biber/issues/237) and https://github.com/plk/biblatex/issues/768, the relevant macros were changed to be slightly more forgiving in the non-numeric input they accept. See https://github.com/plk/biblatex/pull/813. Completely arbitrary stuff in the year field could still break.

As discussed in https://github.com/plk/biber/issues/237 the issue can be reproduced with a .bib entry similar to

@book{appleby,
author  = {Humphrey Appleby},
title   = {On the Importance of the Civil Service},
year    = {\circa{1980}},
}


together with the \circa macro defined as

\newcommand{\circa}[1]{\textit{c}.#1}


The specific issue occurs because \textit in the definition of \circa is not expandable and the year field is expanded completely in an \IfInteger test (courtesy of xstring) when the option datezeros is set to true (the default and initial value).

The following MWE shows a quick work-around for the issue at hand and shows the preferred way to input circa dates together with a modification of the default to reproduce the desired output

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber, datecirca=true]{biblatex}

\newcommand{\circa}[1]{\textit{c}.#1}

% disable datezeros and friends, but allow \circa to work in year fields (appleby)
\makeatletter
\protected\def\blx@imc@forcezerosy#1{#1}
\let\blx@imc@mkyearzeros\blx@imc@forcezerosy
\makeatother

% use EDTF (elk)

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
author  = {Humphrey Appleby},
title   = {On the Importance of the Civil Service},
year    = {\circa{1980}},
}
@book{elk,
author  = {Humphrey Appleby},
title   = {A Theory on Brontosauruses},
date    = {1970~},
}
\end{filecontents}