merged branch tucksaun/fix-issue-1126 (PR #1146)

This PR was merged into the master branch.

Discussion
----------

Fix issue #1126

@fabpot Is this way of adding the test case is ok for you?

Commits
-------

2430431 Fixed #1126
4ce9cbf Added test case for issue #1126
This commit is contained in:
Fabien Potencier
2013-07-24 05:09:29 +02:00
2 changed files with 17 additions and 2 deletions
+2 -2
View File
@@ -217,8 +217,8 @@ zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TS
fci.no_separation = 0;
if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
FREE_DTOR(zfunction)
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", zend_get_class_entry(object TSRMLS_CC)->name, function TSRMLS_CC);
ALLOC_INIT_ZVAL(retval_ptr);
ZVAL_BOOL(retval_ptr, 0);
}
if (args) {
@@ -0,0 +1,15 @@
--TEST--
C extension causes php5-fpm to crash
--TEMPLATE--
{{ data.test1 }}
--DATA--
class test
{
public function __isset($key) {
throw new Exception("Hey! Don't try to isset me!");
}
}
return array('data' => new test())
--EXCEPTION--
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Hey! Don't try to isset me!") in "index.twig" at line 2.