[BUGFIX] Prevent PHP Warning in class.tx_templavoila_api.php

Releases: 1.9
Resolves: #49854
[TASK] Replace usage of $GLOBALS for correct type hinting