Skip to content

GH-59: Fix ObjectEncoder dropping attributes with falsy values#60

Merged
veewee merged 1 commit intophp-soap:mainfrom
openeuropa:GH-59
Apr 3, 2026
Merged

GH-59: Fix ObjectEncoder dropping attributes with falsy values#60
veewee merged 1 commit intophp-soap:mainfrom
openeuropa:GH-59

Conversation

@ademarco
Copy link
Copy Markdown
Contributor

@ademarco ademarco commented Apr 2, 2026

Q A
Type bug
BC Break no
Fixed issues #59

Summary

  • Fix truthiness check in ObjectEncoder that silently dropped XML attributes with falsy PHP values (false, 0, 0.0, "")
  • Replace $value ? with $value !== null ? so only genuinely absent attributes are skipped
  • Add test cases for falsy boolean attribute encoding/decoding

@veewee veewee merged commit a968f3b into php-soap:main Apr 3, 2026
11 checks passed
@veewee
Copy link
Copy Markdown
Member

veewee commented Apr 3, 2026

Thanks!

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.

2 participants