mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
Fix empty string comparison
This commit is contained in:
+1
-1
@@ -1030,7 +1030,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|||||||
// ret can be null, if e.g. the called method throws an exception
|
// ret can be null, if e.g. the called method throws an exception
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) {
|
if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) {
|
||||||
if (Z_STRVAL_P(ret) == "") {
|
if (Z_STRLEN_P(ret) == 0) {
|
||||||
free_ret = 1;
|
free_ret = 1;
|
||||||
} else {
|
} else {
|
||||||
zval *charset = TWIG_CALL_USER_FUNC_ARRAY(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getCharset", NULL TSRMLS_CC);
|
zval *charset = TWIG_CALL_USER_FUNC_ARRAY(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getCharset", NULL TSRMLS_CC);
|
||||||
|
|||||||
Reference in New Issue
Block a user