Fix memory realted to #64726
Merge branch 'PHP-5.3' into PHP-5.4
Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed)