Skip to content

Fix Drop#key? so it can handle a nil argument#6281

Merged
jekyllbot merged 2 commits into
masterfrom
drop-key-types
Aug 9, 2017
Merged

Fix Drop#key? so it can handle a nil argument#6281
jekyllbot merged 2 commits into
masterfrom
drop-key-types

Conversation

@parkr

@parkr parkr commented Aug 8, 2017

Copy link
Copy Markdown
Member

In Liquid 4.0, Liquid::VariableLookup#evaulate checks input.key? when it's evaluating. If the key is nil, it throws the following error:

  Liquid Exception: nil is not a symbol nor a string in <template>

We should simply return false for Drop#key?(nil).

/cc @jekyll/stability

@jekyllbot jekyllbot assigned parkr and ghost Aug 8, 2017
@parkr parkr added the fix label Aug 8, 2017
@parkr parkr requested review from a user and pathawks August 8, 2017 18:40
@parkr

parkr commented Aug 9, 2017

Copy link
Copy Markdown
Member Author

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit bd31986 into master Aug 9, 2017
@jekyllbot jekyllbot deleted the drop-key-types branch August 9, 2017 03:10
jekyllbot added a commit that referenced this pull request Aug 9, 2017
parkr added a commit that referenced this pull request Aug 10, 2017
parkr added a commit that referenced this pull request Aug 10, 2017
Backport #6281 for v3.5.x: Fix Drop#key? so it can handle a nil argument
@parkr parkr mentioned this pull request Aug 10, 2017
6 tasks
@jekyll jekyll locked and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants