Skip to content

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

Open
ademarco wants to merge 1 commit intophp-soap:mainfrom
openeuropa:GH-59
Open

GH-59: Fix ObjectEncoder dropping attributes with falsy values#60
ademarco wants to merge 1 commit intophp-soap:mainfrom
openeuropa:GH-59

Conversation

@ademarco
Copy link
Copy Markdown

@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

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.

1 participant