@Jelle can you set this to be a variable at the top of the file

$config = KunenaConfig::getInstance();

then change this line to $config->avataroncat.