projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
71f64bc
)
Handle NULL filename
author
Charles
<char101@ui.ac.id>
Tue, 6 Nov 2012 04:16:51 +0000 (11:16 +0700)
committer
Charles
<char101@ui.ac.id>
Tue, 6 Nov 2012 04:16:51 +0000 (11:16 +0700)
ext/twig/twig.c
patch
|
blob
|
history
diff --git
a/ext/twig/twig.c
b/ext/twig/twig.c
index
a4830dc
..
c070662
100644
(file)
--- a/
ext/twig/twig.c
+++ b/
ext/twig/twig.c
@@
-604,7
+604,9
@@
static void TWIG_RUNTIME_ERROR(char *filename TSRMLS_DC, char *message, ...)
zend_update_property_string(zend_exception_get_default(TSRMLS_C), ex, "message", sizeof("message")-1, buffer TSRMLS_CC);
efree(buffer);
- zend_update_property_string(*pce, ex, "filename", sizeof("filename")-1, filename TSRMLS_CC);
+ if (filename) {
+ zend_update_property_string(*pce, ex, "filename", sizeof("filename")-1, filename TSRMLS_CC);
+ }
zend_throw_exception_object(ex TSRMLS_CC);
}