Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context::variable refactored, bugs fixed, tests added #41

Merged
merged 3 commits into from Jun 5, 2017

Conversation

sanmai
Copy link
Contributor

@sanmai sanmai commented Jun 1, 2017

  • Do not check for is_object unless necessarily
  • Call toLiquid on every embedded object, not just the first one
  • Save value returned from get method for objects having field_exists method
  • Nullify properties of plain values
  • First try an object's methods, only then resort to properties that may not be readable

Fixes #40, #42

sanmai and others added 3 commits June 1, 2017 17:15
- Call `toLiquid` on every embedded object, not just the first one
- Plain values have null-valued properties
- Do not check for `is_object` unless necessarily
Reason to this is that property_exists ignores all accessibility. Before this change,
even if we had a public method with the same name, we would cause a fatal error trying
to access a private property. Now this will only happen if there's no public method.

> Fatal error: Uncaught Error: Cannot access private property
@harrydeluxe harrydeluxe merged commit 1b94056 into harrydeluxe:master Jun 5, 2017
@sanmai sanmai deleted the context-refactor-harrydeluxe branch September 25, 2017 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants