Permalink
Browse files

[ext] made ext consistent with 8ec73cf

  • Loading branch information...
1 parent 228d2b0 commit 67042276440a077e0176a8de01a6243eae4010c6 @arnaud-lb arnaud-lb committed Aug 13, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 ext/twig/twig.c
View
9 ext/twig/twig.c
@@ -670,6 +670,15 @@ PHP_FUNCTION(twig_template_get_attributes)
INIT_PZVAL(&zitem);
ZVAL_STRINGL(&zitem, item, item_len, 0);
+ switch (is_numeric_string(item, item_len, &Z_LVAL(zitem), &Z_DVAL(zitem), 0)) {
+ case IS_LONG:
+ Z_TYPE(zitem) = IS_LONG;
+ break;
+ case IS_DOUBLE:
+ ZVAL_LONG(&zitem, zend_dval_to_lval(Z_DVAL(zitem)));
+ break;
+ }
+
if (!type) {
type = "any";
}

0 comments on commit 6704227

Please sign in to comment.