I think the problem with the code in this issue is that it does not treat the return value of leaflet_map_get_info() as an array.
So in the call to leaflet_render_map() you probably want to pass in reset($leaflet_map), rather than $leaflet_map