Skip to content

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

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

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

Conversation

@ademarco

@ademarco ademarco commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
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

veewee commented Apr 3, 2026

Copy link
Copy Markdown
Member

Thanks!

@ademarco

ademarco commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @veewee ! Any chance this can be back-ported to 0.31.0, as a 0.31.1? We still need to ensure compatibility with PHP 8.3, and that is dropped on 0.32.0.

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