-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix PHPStan undefined variable errors at level 3 #11189
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
base: trunk
Are you sure you want to change the base?
Changes from 4 commits
f86194a
8b93b41
30d971c
9d9dd59
e6bbbfc
eef6fa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -100,7 +100,7 @@ | |||||
| include WP_CONTENT_DIR . '/advanced-cache.php'; | ||||||
|
|
||||||
| // Re-initialize any hooks added manually by advanced-cache.php. | ||||||
| if ( $wp_filter ) { | ||||||
| if ( ! empty( $wp_filter ) ) { | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May use if ( isset( $wp_filter ) ) {
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be not the same though. Before it was checking for a truthy value, which is what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, true! I'm just trying to avoid non-strict type functions like
Suggested change
|
||||||
| $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter ); | ||||||
| } | ||||||
| } | ||||||
|
|
@@ -140,7 +140,7 @@ | |||||
| * | ||||||
| * @global string $table_prefix The database table prefix. | ||||||
| */ | ||||||
| if ( ! isset( $GLOBALS['table_prefix'] ) ) { | ||||||
| if ( ! isset( $GLOBALS['table_prefix'] ) && isset( $table_prefix ) ) { | ||||||
|
huzaifaalmesbah marked this conversation as resolved.
Outdated
|
||||||
| $GLOBALS['table_prefix'] = $table_prefix; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.