merged branch Tobion/patch-1 (PR #1030)
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 7 May 2013 18:56:07 +0000 (20:56 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 7 May 2013 18:56:07 +0000 (20:56 +0200)
This PR was merged into the master branch.

Discussion
----------

fix numeric & boolean & float keys in array

Reopened PR of #878

Commits
-------

2c56b70 Merge pull request #3 from tucksaun/patch-1
17d6cc7 [ext] fixed tabs
46012ce [ext] improvements
21f8062 [ext] code cleaning
9347c52 [ext] updated PHP code documenting C code
b41ce60 updated C extension accordingly
e5291e1 rename item to attribute in the exception message because that's the term that is used in twig, e.g. the  function
a93f0dc further improved exception message and distinguish array_call and any_call access
26bac14 added tests for array access with confusable keys
db744d5 fix test that that would not fail if no exception is thrown
9ea16ec refactored getAttribute
6fb5afa improved error message for non-existent or invalid attributes
fdfd506 added changelog entry about fixed boolean array access
da616c5 fixed getAttribute for array access with a boolean or float key
b6acf9d updated CHANGELOG
c4d5b3f added some unit tests for previous merge
e84448b fix numeric keys in array

1  2 
CHANGELOG
ext/twig/twig.c

diff --cc CHANGELOG
+++ b/CHANGELOG
@@@ -1,16 -1,9 +1,18 @@@
 -* 1.12.3 (2013-XX-XX)
 +* 1.13.0 (2013-XX-XX)
  
 + * made the escape filter 20% faster for happy path (escaping string for html with UTF-8)
 + * changed ☃ to § in tests
 + * enforced usage of named arguments after positional ones
 +
 +* 1.12.3 (2013-04-08)
 +
 + * fixed a security issue in the filesystem loader where it was possible to include a template one
 +   level above the configured path
 + * fixed fatal error that should be an exception when adding a filter/function/test too late
   * added a batch filter
   * added support for encoding an array as query string in the url_encode filter
+  * fixed getting a numeric-like item on a variable ('09' for instance)
+  * fixed getting a boolean or float key on an array, so it is consistent with PHP's array access: `{{ array[false] }}` behaves the same as `echo $array[false];` (equals `$array[0]`)
  
  * 1.12.2 (2013-02-09)
  
diff --cc ext/twig/twig.c
Simple merge