BUG fixing DB Conn Broken in 3.1.4 by using register_shutdown_function instead of overriding __destruct.