Skip to content

Commit

Permalink
Fix PHAN errors
Browse files Browse the repository at this point in the history
  • Loading branch information
IanRamosC committed Dec 17, 2024
1 parent aba4411 commit 33c7e05
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Newsletter extends Module_Product {
/**
* Whether this product requires a user connection
*
* @var string
* @var boolean
*/
public static $requires_user_connection = true;

Expand Down Expand Up @@ -170,6 +170,10 @@ public static function get_manage_url() {
* @return null|WP_Error Null on success, WP_Error on invalid file.
*/
public static function activate_plugin() {
return activate_plugin( static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG ) );
$plugin_filename = static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG );

if ( $plugin_filename ) {
return activate_plugin( $plugin_filename );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Related_Posts extends Module_Product {
/**
* Whether this product requires a user connection
*
* @var string
* @var boolean
*/
public static $requires_user_connection = false;

Expand Down Expand Up @@ -170,6 +170,10 @@ public static function get_manage_url() {
* @return null|WP_Error Null on success, WP_Error on invalid file.
*/
public static function activate_plugin() {
return activate_plugin( static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG ) );
$plugin_filename = static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG );

if ( $plugin_filename ) {
return activate_plugin( $plugin_filename );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Site_Accelerator extends Module_Product {
/**
* Whether this product requires a user connection
*
* @var string
* @var boolean
*/
public static $requires_user_connection = false;

Expand Down Expand Up @@ -170,6 +170,10 @@ public static function get_manage_url() {
* @return null|WP_Error Null on success, WP_Error on invalid file.
*/
public static function activate_plugin() {
return activate_plugin( static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG ) );
$plugin_filename = static::get_installed_plugin_filename( self::JETPACK_PLUGIN_SLUG );

if ( $plugin_filename ) {
return activate_plugin( $plugin_filename );
}
}
}

0 comments on commit 33c7e05

Please sign in to comment.