diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2016-03-17 03:41:36 +0100 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2016-03-17 03:41:36 +0100 |
commit | 9583cb84a2d6a3edcfdc6883f868601a5368c6fa (patch) | |
tree | 37513b6b965d2f767224304f15c26ece2d29732a /Zend/zend_generators.c | |
parent | c808e44d853f42fc277e450971741b8fadaffa8b (diff) | |
download | php-git-9583cb84a2d6a3edcfdc6883f868601a5368c6fa.tar.gz |
Fix build
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r-- | Zend/zend_generators.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 9633fc4f2d..5a3e84ccd1 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -386,6 +386,8 @@ ZEND_API zend_execute_data *zend_generator_check_placeholder_frame(zend_execute_ static void zend_generator_throw_exception(zend_generator *generator, zval *exception) { + zend_execute_data *original_execute_data = EG(current_execute_data); + /* if we don't stop an array/iterator yield from, the exception will only reach the generator after the values were all iterated over */ if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) { zval_ptr_dtor(&generator->values); @@ -394,7 +396,6 @@ static void zend_generator_throw_exception(zend_generator *generator, zval *exce /* Throw the exception in the context of the generator. Decrementing the opline * to pretend the exception happened during the YIELD opcode. */ - zend_execute_data *original_execute_data = EG(current_execute_data); EG(current_execute_data) = generator->execute_data; generator->execute_data->opline--; if (exception) { |