-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow backwards compatible null property behavior.
Per the Mustache spec, keys of a value higher in the context stack shadow similarly named keys lower in the stack. For example, in the template `{{# foo }}{{ bar }}{{/ foo }}` if the value for `foo` has a method, property, or key named `bar`, it will prevent looking lower in the context stack for a another value named `bar`. In Mustache.php, setting the value of an array key to null prevents lookups higher in the context stack. The behavior should have been identical for object properties (and ArrayAccess) as well, but a bug in the context lookup logic meant that a property which exists but is set to null would not prevent further context lookup. This change adds a `buggy_property_shadowing` configuration option to preserve the behavior from Mustache.php <= 2.14.2, to ease the transition to the correct behavior. See #410
- Loading branch information
Showing
4 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters