Sorry for the mistake: the code should, of course, refer to the same variable.
In the meantime, I figured out myself what was wrong. It was the PHP.ini option error_reporting=E_ALL that was the difference between the former situation and the new one: it now also shows notices.
In fact, the PHP code is not OK, I should initialize the variables if they do not exist, before I use them.
I think that making mistakes is the best way to improve knowledge.
Sorry for bothering you...