Skip to content

Commit

Permalink
Bug fix. See: wpsharks/comment-mail#82
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswsinc committed May 29, 2015
1 parent 305a0bf commit 16da06b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions comment-mail-pro/includes/classes/sub-manage-sub-form-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
namespace comment_mail // Root namespace.
{

if(!defined('WPINC')) // MUST have WordPress.
exit('Do NOT access this file directly: '.basename(__FILE__));

Expand Down Expand Up @@ -160,15 +161,21 @@ public function __construct($sub_key = NULL)
*/
protected function maybe_display()
{
$_this = $this;
$sub_key = $this->sub_key;
$is_edit = $this->is_edit;
$sub = $this->sub;

$form_fields = $this->form_fields;
$current_value_for = array($this, 'current_value_for');
$hidden_inputs = array($this, 'hidden_inputs');

$processing = static::$processing;
$current_value_for = function ($key_prop) use ($_this)
{
return $_this->current_value_for($key_prop);
};
$hidden_inputs = function () use ($_this)
{
return $_this->hidden_inputs();
};
$processing = static::$processing;

$processing_errors = static::$processing_errors;
$processing_error_codes = static::$processing_error_codes;
Expand Down Expand Up @@ -401,4 +408,4 @@ public static function process(array $request_args)
}
}
}
}
}

0 comments on commit 16da06b

Please sign in to comment.