From: Arnaud Le Blanc Date: Thu, 23 Aug 2012 11:32:55 +0000 (+0200) Subject: php5.2 fix X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=8fa97bb526b5b639449267af9906126a615034f9;p=web%2Fkonrad%2Ftwig.git php5.2 fix --- diff --git a/ext/twig/twig.c b/ext/twig/twig.c index 3c340f2..bcde29b 100644 --- a/ext/twig/twig.c +++ b/ext/twig/twig.c @@ -675,7 +675,8 @@ PHP_FUNCTION(twig_template_get_attributes) Z_TYPE(zitem) = IS_LONG; break; case IS_DOUBLE: - ZVAL_LONG(&zitem, zend_dval_to_lval(Z_DVAL(zitem))); + Z_TYPE(zitem) = IS_DOUBLE; + convert_to_long(&zitem); break; } diff --git a/test/Twig/Tests/TemplateTest.php b/test/Twig/Tests/TemplateTest.php index 978a5be..9c5b909 100644 --- a/test/Twig/Tests/TemplateTest.php +++ b/test/Twig/Tests/TemplateTest.php @@ -320,7 +320,7 @@ class Twig_TemplatePropertyObjectAndIterator extends Twig_TemplatePropertyObject } } -class Twig_TemplatePropertyObjectAndArrayAccess extends Twig_TemplatePropertyObject implements \ArrayAccess +class Twig_TemplatePropertyObjectAndArrayAccess extends Twig_TemplatePropertyObject implements ArrayAccess { private $data = array();