projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4311df3
)
Fix empty string comparison
author
Charles
<char101@ui.ac.id>
Thu, 6 Dec 2012 01:39:46 +0000 (08:39 +0700)
committer
Charles
<char101@ui.ac.id>
Thu, 6 Dec 2012 01:39:46 +0000 (08:39 +0700)
ext/twig/twig.c
patch
|
blob
|
history
diff --git
a/ext/twig/twig.c
b/ext/twig/twig.c
index
1fea683
..
f871d1e
100644
(file)
--- a/
ext/twig/twig.c
+++ b/
ext/twig/twig.c
@@
-1030,7
+1030,7
@@
PHP_FUNCTION(twig_template_get_attributes)
// ret can be null, if e.g. the called method throws an exception
if (ret) {
if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) {
- if (Z_STRVAL_P(ret) == "") {
+ if (Z_STRLEN_P(ret) == 0) {
free_ret = 1;
} else {
zval *charset = TWIG_CALL_USER_FUNC_ARRAY(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getCharset", NULL TSRMLS_CC);