Merge pull request #262 from pfefferle/fix-post-property-access

Fix accessing post properties
This commit is contained in:
Matthias Pfefferle 2023-01-27 14:43:24 +01:00 committed by GitHub
commit 45d668d7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,6 +108,9 @@ class Post {
$var = \strtolower( \substr( $method, 4 ) );
if ( \strncasecmp( $method, 'get', 3 ) === 0 ) {
if ( empty( $this->$var ) && ! empty( $this->post->$var ) ) {
return $this->post->$var;
}
return $this->$var;
}