Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -19869,8 +19869,10 @@ private function _store_plans( $store = true ) {

// Copy plans.
$encrypted_plans = array();
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
$encrypted_plans[] = self::_encrypt_entity( $this->_plans[ $i ] );
if ( is_array( $this->_plans ) ) {
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
$encrypted_plans[] = self::_encrypt_entity( $this->_plans[ $i ] );
}
}

$plans[ $this->_slug ] = $encrypted_plans;
Expand Down
2 changes: 1 addition & 1 deletion includes/entities/class-fs-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class FS_Site extends FS_Scope_Entity {
function __construct( $site = false ) {
parent::__construct( $site );

if ( is_object( $site ) ) {
if ( is_object( $site ) && isset( $site->plan_id ) ) {
$this->plan_id = $site->plan_id;
}

Expand Down