Skip to content

Commit 6b8fb5a

Browse files
committed
Fix accessing post properties
1 parent 934ef86 commit 6b8fb5a

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)