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

text_join argument precedence bug in PHP #2161

Closed
bkisdi opened this issue Dec 10, 2018 · 0 comments
Closed

text_join argument precedence bug in PHP #2161

bkisdi opened this issue Dec 10, 2018 · 0 comments
Labels
component: generators help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong low priority

Comments

@bkisdi
Copy link

bkisdi commented Dec 10, 2018

Problem statement

The text_join block uses incorrect argument precedence in PHP code generation.

Steps to Reproduce

text_join-bug

Toggle true to false at the next run.

Actual Behavior

It produces 'T' or 'FX', based on the test value.

Expected Behavior

Return 'TX' or 'FX' respectively.

Additional Information

if (block.itemCount_ == 2), it uses Blockly.PHP.ORDER_NONE for its arguments instead of something smaller.
And should return [code, Blockly.PHP.ORDER_STRING_CONCAT] (which level is actually never used in the code base) instead of ORDER_ADDITION.

@rachel-fenichel rachel-fenichel added issue: bug Describes why the code or behaviour is wrong help wanted External contributions actively solicited component: generators low priority labels Dec 10, 2018
rachel-fenichel added a commit that referenced this issue Dec 17, 2018
Fix #2161: Changes outerOrder for PHP/text component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: generators help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong low priority
Projects
None yet
Development

No branches or pull requests

2 participants