mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
General: Fix code quality issues which were identified by static analysis.
This fixes minor issues that could cause PHP notices under the right conditions, and fixes some general incorrectness. Props jrf, hellofromTonya for review See #52217 git-svn-id: https://develop.svn.wordpress.org/trunk@51850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -207,12 +207,14 @@ class WP_List_Table {
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param string $name Property to check if set.
|
||||
* @return bool Whether the property is set.
|
||||
* @return bool Whether the property is a back-compat property and it is set.
|
||||
*/
|
||||
public function __isset( $name ) {
|
||||
if ( in_array( $name, $this->compat_fields, true ) ) {
|
||||
return isset( $this->$name );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -313,6 +315,8 @@ class WP_List_Table {
|
||||
if ( isset( $this->_pagination_args[ $key ] ) ) {
|
||||
return $this->_pagination_args[ $key ];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user