Skip to content

Commit 15082d4

Browse files
pfefferleclaude
andcommitted
Return empty string instead of null for non-existent properties
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 29509ac commit 15082d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

includes/entity/class-item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function __call( $method, $params ) {
115115
$var = strtolower( substr( $method, 4 ) );
116116

117117
if ( strncasecmp( $method, 'get', 3 ) === 0 ) {
118-
return property_exists( $this, $var ) ? $this->$var : null;
118+
return property_exists( $this, $var ) ? $this->$var : '';
119119
}
120120

121121
if ( strncasecmp( $method, 'has', 3 ) === 0 ) {

0 commit comments

Comments
 (0)