Fix config data collector.

Trying to use $data directly was resulting in an exception saying "Object of class Closure could not be converted to string".