-
Notifications
You must be signed in to change notification settings - Fork 178
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: Remove WP_Post
type hint from prefill_post_content
#13430
Fix: Remove WP_Post
type hint from prefill_post_content
#13430
Conversation
…ll_post_content-and-prefill_post_title-methods
WP_Post
type declaration from prefill_post_content
WP_Post
type declaration from prefill_post_content
WP_Post
type declaration from prefill_post_content
WP_Post
type declaration from prefill_post_content
Plugin builds for cdcccb4 are ready 🛎️!
|
Size Change: 0 B Total Size: 2.74 MB ℹ️ View Unchanged
|
@swissspidy Minimum PHP version requirement for Also, would you please guide me for the failed test cases? |
Ah yes, nullable works too I suppose. No need to add a test case. |
Co-authored-by: Pascal Birchler <[email protected]>
…ll_post_content-and-prefill_post_title-methods
WP_Post
type declaration from prefill_post_content
WP_Post
type hint from prefill_post_content
Context
The goal of the PR is to fix fatal error when providing
null
value to the second parameter$post
of the functionGoogle\Web_Stories\Admin\Admin::prefill_post_content()
.Summary
Supplying
null
value to the second parameter$post
of the functionGoogle\Web_Stories\Admin\Admin::prefill_post_content()
causes fatal error as the respected parameter type is explicitly defined asWP_Post
. Thus, removingWP_Post
type and updatingphpdoc
resolves the issue.Relevant Technical Choices
Not applicable.
To-do
User-facing changes
Not applicable.
Testing Instructions
Not applicable.
Reviews
Does this PR have a security-related impact?
No.
Does this PR change what data or activity we track or use?
No.
Does this PR have a legal-related impact?
No.
Checklist
Type: XYZ
label to the PRFixes #13405