Internal Server Error

[ZgbK--vPWJvNoAxkvD9DeQAAABM] /cbg/api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo Error from line 41 of /var/www/html/prod/cbg/includes/api/ApiQueryAllImages.php: Call to undefined method MediaWiki\MediaWikiServices::getRepoGroup()
Backtrace:
#0 /var/www/html/prod/cbg/includes/api/ApiModuleManager.php(200): ApiQueryAllImages->__construct(ApiQuery, string)
#1 /var/www/html/prod/cbg/includes/api/ApiModuleManager.php(167): ApiModuleManager->instantiateModule(string, string, NULL)
#2 /var/www/html/prod/cbg/includes/api/ApiPageSet.php(156): ApiModuleManager->getModule(string, NULL, boolean)
#3 /var/www/html/prod/cbg/includes/api/ApiPageSet.php(140): ApiPageSet->executeInternal(boolean)
#4 /var/www/html/prod/cbg/includes/api/ApiQuery.php(234): ApiPageSet->execute()
#5 /var/www/html/prod/cbg/includes/api/ApiMain.php(1582): ApiQuery->execute()
#6 /var/www/html/prod/cbg/includes/api/ApiMain.php(535): ApiMain->executeAction()
#7 /var/www/html/prod/cbg/includes/api/ApiMain.php(506): ApiMain->executeActionWithErrorHandling()
#8 /var/www/html/prod/cbg/api.php(94): ApiMain->execute()
#9 {main}