Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Warning: Attempt to read property post_author on null #826

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

mebishalnapit
Copy link
Collaborator

This PR includes:

  • Fixes PHP warning message being logged into the debug log file when notification addon is enabled and adding answer to a question from back end if WordPress debug log is enabled

@mebishalnapit mebishalnapit linked an issue Aug 11, 2023 that may be closed by this pull request
'verb' => 'new_answer',
)
);
if ( $_question ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mebishalnapit Doing below will make code easy to read:

if ( !$_question ) {
    return;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahularyan Updated.

@rahularyan rahularyan merged commit 1831234 into master Feb 21, 2024
6 checks passed
@rahularyan rahularyan deleted the fix-697-new branch April 17, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning: Attempt to read property post_author on null
2 participants