The other bug refers to a variable named $ag , this one refers to $Ah... Don't know if they're the very same bug. Also, I think in Php 8 this kind of problem has been always raised from notice to warning , and you either suppress all warnings (which can be too much) or really solve the bugs, since you can't only suppress this warning.
AJAX calls failing , a warning appears in the ajax response