Skip to content

Commit

Permalink
Update src/Rest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
vitvavra authored Dec 5, 2022
1 parent bef2a22 commit f0dea31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function create_item( $request ) {

$membership = new Membership( $user_id );
// Check if the user is already member of the group, if so, adjust the valid to date
if ( ! empty( $membership->groups[ $group ]['valid_to'] && $valid_to_months !== '' ) ) {
if ( ! empty( $membership->groups[ $group ]['valid_to']) && $valid_to_months !== '' ) {
$valid_from = $request->get_param( 'valid_from' ) ?: '';
$original_valid_to = $membership->groups[ $group ]['valid_to'];
$original_valid_from = isset( $membership->groups[ $group ]['valid_from'] )
Expand Down

0 comments on commit f0dea31

Please sign in to comment.