]> granicus.if.org Git - php/commitdiff
don't segfault if an exception has been thrown from the fetch handler
authorAntony Dovgal <tony2001@php.net>
Sat, 22 Apr 2006 19:10:40 +0000 (19:10 +0000)
committerAntony Dovgal <tony2001@php.net>
Sat, 22 Apr 2006 19:10:40 +0000 (19:10 +0000)
ext/pdo/pdo_stmt.c

index 0ec5d16d68b0868719d3db9500134655cc8a564a..d40fe304f7a9c181196273b0f8f2ef2594d55bda 100755 (executable)
@@ -1055,7 +1055,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
                                        if (return_all) {
                                                zval_ptr_dtor(&return_value); /* we don't need that */
                                                return_value = retval;
-                                       } else {
+                                       } else if (retval) {
                                                *return_value = *retval;
                                                zval_copy_ctor(return_value);
                                                INIT_PZVAL(return_value);