From: Antony Dovgal Date: Sat, 22 Apr 2006 19:10:40 +0000 (+0000) Subject: don't segfault if an exception has been thrown from the fetch handler X-Git-Tag: RELEASE_1_3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22d4fb98e3ccb77df5f34a3fe68aeeb708174f9b;p=php don't segfault if an exception has been thrown from the fetch handler --- 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);