Shouldn't this be `$driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);`