Commit Graph

1985 Commits

Author SHA1 Message Date
Fabien Potencier 8bbbecd08e merged branch drewjw81/extension_global_fix (PR #1053)
This PR was squashed before being merged into the master branch (closes #1053).

Discussion
----------

Prevent extensions from clobbering all globals.

It's possible for a poorly written extension to destroy all global variables by returning nothing.  This prevents that and throws an E_WARNING to notify the developer.

Commits
-------

7c8acf7 Prevent extensions from clobbering all globals.
2013-04-12 11:46:40 +02:00
Andrew Winter 7c8acf712e Prevent extensions from clobbering all globals. 2013-04-12 11:46:40 +02:00
Fabien Potencier 1819d97520 removed unused variable 2013-04-09 18:55:44 +02:00
Jerome Brissonnet e28522812a Fixed : fatal error when using defined test on an invalid expression 2013-04-08 22:43:53 +02:00
Tobias Schultze 2c56b706e2 Merge pull request #3 from tucksaun/patch-1
Updating C extension
2013-04-08 13:36:24 -07:00
Tugdual Saunier 17d6cc7f10 [ext] fixed tabs 2013-04-08 17:20:46 +02:00
Tugdual Saunier 46012ce3b1 [ext] improvements 2013-04-08 17:20:42 +02:00
Tugdual Saunier 21f80622b6 [ext] code cleaning 2013-04-08 17:20:36 +02:00
Tugdual Saunier 9347c52b64 [ext] updated PHP code documenting C code 2013-04-08 17:20:09 +02:00
Fabien Potencier ceadaa68af bumped version to 1.12.4-DEV 2013-04-08 15:07:19 +02:00
Fabien Potencier 27f3428b08 prepared the 1.12.2 release v1.12.3 2013-04-08 14:40:11 +02:00
Fabien Potencier 0693062a5e updated CHANGELOG for previous commit 2013-04-08 14:30:59 +02:00
Rick Prent 3d19a2eed5 Fixed twig filesystemloader security issue + test (closes #1026) 2013-04-08 14:15:31 +02:00
Fabien Potencier 481abb8332 tweaked previous merge 2013-04-08 14:11:21 +02:00
Fabien Potencier 0f74ca8a4c merged branch ThatGuyBen/patch-1 (PR #1048)
This PR was merged into the master branch.

Discussion
----------

Update json_encode.rst

a more-useful description of the "options" argument >_>

Commits
-------

742043f Update json_encode.rst
2013-04-08 14:10:12 +02:00
Ben 742043f9e2 Update json_encode.rst
a more-useful description of the "options" argument >_>
2013-04-01 18:30:05 -03:00
Fabien Potencier 3999169165 updated CHANGELOG 2013-04-01 10:27:18 +02:00
Fabien Potencier 296bae96e7 merged branch ShadowPrince/master (PR #1042)
This PR was squashed before being merged into the master branch (closes #1042).

Discussion
----------

Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error

Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error:

$environment->addFunction(new Twig_SimpleFunction(...))
after 
$environment->render(...)
throws Fatal Error: 
object of Twig_SimpleFunction could not be converted to string

Commits
-------

92e97b9 Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error
2013-04-01 10:26:39 +02:00
Vasiliy Horbachenko 92e97b9d90 Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error 2013-04-01 10:26:39 +02:00
Fabien Potencier e8991cc2f9 tweaked previous merge 2013-03-25 08:43:31 +01:00
Fabien Potencier 34b03285ad merged branch beryllium/patch-1 (PR #1032)
This PR was merged into the master branch.

Discussion
----------

Adding a section about the slice filter to doc/tags/for.rst

This code example shows how to loop over a subset of values in order to implement one common use-case of "break" in PHP. I decided to use the "full" notation of slice rather than the sugared version (that example would just be "for user in users[:10]")

Commits
-------

202641a Adding link to slice filter per Stof's suggestion
8ebbaaa Adding a section about the slice filter
2013-03-25 08:42:48 +01:00
Fabien Potencier 2f14935e62 merged branch ricardclau/typo_sort_doc (PR #1039)
This PR was merged into the master branch.

Discussion
----------

Minor typo in sort filter documentation

I've found this small typo while working on shuffle filter documentation in https://github.com/fabpot/Twig/pull/1038

I decided to create separate PR in case https://github.com/fabpot/Twig/pull/1038 got rejected

Best regards!

Commits
-------

1443b76 minor typo in sort documentation
2013-03-25 08:41:44 +01:00
Fabien Potencier d7f6bced54 merged branch tommygnr/fix-docs-batch-filter (PR #1040)
This PR was merged into the master branch.

Discussion
----------

Fix filename for batch filter documentation

The documentation on the website for the batch filter currently 404s See: http://twig.sensiolabs.org/doc/filters/batch.html

I believe this is because the filename is incorrect. This PR fixes that.

Commits
-------

bb05942 Fix filename for batch filter documentation
2013-03-25 08:41:31 +01:00
Tom Corrigan bb05942153 Fix filename for batch filter documentation 2013-03-25 16:00:17 +11:00
Ricard Clau 1443b765e1 minor typo in sort documentation 2013-03-24 13:27:05 +01:00
Fabien Potencier ff724c81ca merged branch tucksaun/fix-5.2-TSRM (PR #1037)
This PR was merged into the master branch.

Discussion
----------

Revert "merged branch pierrejoye/master (PR #855)"

This reverts commit 347bc81d6e

This commit make compilation failed for PHP5.2 with thread-safe enabled (see https://travis-ci.org/fabpot/Twig/jobs/5523865)

Commits
-------

4383388 Revert "merged branch pierrejoye/master (PR #855)"
2013-03-22 16:32:12 +01:00
Tugdual Saunier 438338827b Revert "merged branch pierrejoye/master (PR #855)"
This reverts commit 347bc81d6e, reversing
changes made to 5d7baaf767.
2013-03-22 16:25:51 +01:00
Fabien Potencier 0bf57a8c9a merged branch specialguest/patch-1 (PR #1034)
This PR was merged into the master branch.

Commits
-------

c6ef23a Update striptags.rst

Discussion
----------

Update striptags.rst

Hello

I just changed
{% some_html|striptags %}
to
{{ some_html|striptags }}

Regards

Julien
2013-03-22 12:30:55 +01:00
Kevin Boyd 202641a084 Adding link to slice filter per Stof's suggestion 2013-03-18 09:31:54 -07:00
specialguest c6ef23ab1d Update striptags.rst 2013-03-18 15:20:21 +01:00
Kevin Boyd 8ebbaaa4cc Adding a section about the slice filter
This code example shows how to loop over a subset of values in order to implement one common use-case of "break" in PHP. I decided to use the "full" notation of slice rather than the sugared version (that example would just be "for user in users[:10]")
2013-03-17 23:18:20 -07:00
Arjen Brouwer b41ce6094c updated C extension accordingly 2013-03-15 12:00:27 +01:00
Tobias Schultze e5291e1be1 rename item to attribute in the exception message because that's the term that is used in twig, e.g. the function 2013-03-15 12:00:26 +01:00
Tobias Schultze a93f0dca38 further improved exception message and distinguish array_call and any_call access 2013-03-15 12:00:26 +01:00
Tobias Schultze 26bac14c76 added tests for array access with confusable keys
array keys like boolean, numeric but string, floats, null
2013-03-15 12:00:25 +01:00
Tobias Schultze db744d5e51 fix test that that would not fail if no exception is thrown 2013-03-15 12:00:24 +01:00
Tobias Schultze 9ea16ec643 refactored getAttribute 2013-03-15 12:00:23 +01:00
Tobias Schultze 6fb5afa28f improved error message for non-existent or invalid attributes 2013-03-15 12:00:22 +01:00
Tobias Schultze fdfd506caf added changelog entry about fixed boolean array access 2013-03-15 12:00:21 +01:00
Tobias Schultze da616c5169 fixed getAttribute for array access with a boolean or float key 2013-03-15 11:58:45 +01:00
Fabien Potencier b6acf9dc53 updated CHANGELOG 2013-03-15 11:58:44 +01:00
Fabien Potencier c4d5b3ffdb added some unit tests for previous merge 2013-03-15 11:56:03 +01:00
Tobias Schultze e84448bc84 fix numeric keys in array 2013-03-15 11:56:02 +01:00
Fabien Potencier ba67e2cf8e merged branch pborreli/typos (PR #1028)
This PR was merged into the master branch.

Commits
-------

49488b8 Fixed typos

Discussion
----------

Fixed typos
2013-03-10 08:23:01 +01:00
Pascal Borreli 49488b8f24 Fixed typos 2013-03-10 02:06:44 +00:00
Fabien Potencier b6c2171579 merged branch carlwitt/patch-1 (PR #1022)
This PR was merged into the master branch.

Commits
-------

59d0eed Update merge.rst

Discussion
----------

Update merge.rst

Typo in first line:
The merge filter merges an array with [removed: the] another array
2013-03-07 07:57:14 +01:00
carlwitt 59d0eed9f7 Update merge.rst
Typo in first line:
The merge filter merges an array with [removed: the] another array
2013-03-04 10:54:34 +01:00
Fabien Potencier 39d94faabc fixed phpdoc 2013-02-28 15:08:49 +01:00
Fabien Potencier bc30d9b7e2 merged branch Tobion/buildquery (PR #1009)
This PR was squashed before being merged into the master branch (closes #1009).

Commits
-------

fcf9525 let url_encode filter also accept array of query parameters

Discussion
----------

let url_encode filter also accept array of query parameters

BC break: no
feature addition: yes
tests pass: yes
documentation: yes

This is also supported in Jinja and so it's consistent: [jinja urlencode](http://modular.math.washington.edu/home/wstein/www/home/bjarke/sage-4.4.4/local/LIB/python/site-packages/Jinja-1.2-py2.6-linux-x86_64.egg/docs/html/builtins.html)
2013-02-26 14:03:39 +01:00
Tobias Schultze fcf9525dc3 let url_encode filter also accept array of query parameters 2013-02-26 14:03:39 +01:00