Skip to content

fix: reject non-string rules:if - #1909

Merged
firecow merged 1 commit into
masterfrom
fix/reject-non-string-rules-if
Aug 1, 2026
Merged

fix: reject non-string rules:if#1909
firecow merged 1 commit into
masterfrom
fix/reject-non-string-rules-if

Conversation

@firecow

@firecow firecow commented Jul 31, 2026

Copy link
Copy Markdown
Owner

A rules entry with an empty if: key parses as null and reached string methods directly, so a config mistake surfaced as TypeError: null is not an object instead of a config error. Fixes #1841.


Summary by cubic

Reject non-string values in rules:if and show a clear config error instead of a TypeError (fixes #1841). Adds a type check in Utils.evaluateRuleIf and tests for null, number, boolean, and array inputs.

Written for commit 71f1282. Summary will update on new commits.

Review in cubic

A rules entry with an empty if key parses as null and hit string methods
directly, so a config mistake surfaced as a TypeError.
@firecow firecow self-assigned this Jul 31, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@sonarqubecloud

Copy link
Copy Markdown

@firecow
firecow merged commit 349e7cc into master Aug 1, 2026
16 checks passed
@firecow
firecow deleted the fix/reject-non-string-rules-if branch August 1, 2026 07:27
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.

Cannot run gitlab jobs locally

1 participant