Merge pull request #262 from pfefferle/fix-post-property-access
Fix accessing post properties
This commit is contained in:
commit
45d668d7ee
1 changed files with 3 additions and 0 deletions
|
@ -108,6 +108,9 @@ class Post {
|
||||||
$var = \strtolower( \substr( $method, 4 ) );
|
$var = \strtolower( \substr( $method, 4 ) );
|
||||||
|
|
||||||
if ( \strncasecmp( $method, 'get', 3 ) === 0 ) {
|
if ( \strncasecmp( $method, 'get', 3 ) === 0 ) {
|
||||||
|
if ( empty( $this->$var ) && ! empty( $this->post->$var ) ) {
|
||||||
|
return $this->post->$var;
|
||||||
|
}
|
||||||
return $this->$var;
|
return $this->$var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue