From 22d4fb98e3ccb77df5f34a3fe68aeeb708174f9b Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sat, 22 Apr 2006 19:10:40 +0000 Subject: [PATCH] don't segfault if an exception has been thrown from the fetch handler --- ext/pdo/pdo_stmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 0ec5d16d68..d40fe304f7 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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); -- 2.50.1