Skip to content

Commit 45d668d

Browse files
authored
Merge pull request #262 from pfefferle/fix-post-property-access
Fix accessing post properties
2 parents 934ef86 + 6b8fb5a commit 45d668d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

includes/model/class-post.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ public function __call( $method, $params ) {
108108
$var = \strtolower( \substr( $method, 4 ) );
109109

110110
if ( \strncasecmp( $method, 'get', 3 ) === 0 ) {
111+
if ( empty( $this->$var ) && ! empty( $this->post->$var ) ) {
112+
return $this->post->$var;
113+
}
111114
return $this->$var;
112115
}
113116

0 commit comments

Comments
 (0)