Skip to content

Commit

Permalink
Fix casting as boolean bug in $current_email; See: wpsharks/comment-m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristine delos Santos committed Aug 10, 2016
1 parent a8342f9 commit 64f1aea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/includes/classes/SubManageSubFormBase.php
Expand Up @@ -159,8 +159,8 @@ protected function maybeDisplay()
$sub_key = $this->sub_key;
$is_edit = $this->is_edit;
$sub = $this->sub;
$current_email = (boolean)$this->plugin->utils_sub->currentEmail();
$has_subscriptions = $current_email ? (boolean)$this->plugin->utils_sub->queryTotal(null, ['sub_email' => $current_email, 'status' => 'subscribed', 'sub_email_or_user_ids' => true]) : false;
$current_email = $this->plugin->utils_sub->currentEmail();
$has_subscriptions = (boolean)$current_email ? (boolean)$this->plugin->utils_sub->queryTotal(null, ['sub_email' => $current_email, 'status' => 'subscribed', 'sub_email_or_user_ids' => true]) : false;

$form_fields = $this->form_fields;

Expand Down

0 comments on commit 64f1aea

Please sign in to comment.