Skip to content

Commit

Permalink
make json output work?
Browse files Browse the repository at this point in the history
  • Loading branch information
sepiariver committed Dec 3, 2015
1 parent 395257b commit 8aa0feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/components/formit/model/formit/fihooks.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function __construct(FormIt &$formit,array $config = array(),$type = '') {
'mathOp1Field' => 'op1',
'mathOp2Field' => 'op2',
'mathOperatorField' => 'operator',
'jsonOutputPlaceholder' => ''
'hookErrorJsonOutputPlaceholder' => ''
),$config);
$this->type = $type;
}
Expand Down Expand Up @@ -693,6 +693,7 @@ public function math(array $fields = array()) {
public function processErrors() {
$errors = array();
$jsonerrors = array();
$jsonOutputPlaceholder = $this->config['hookErrorJsonOutputPlaceholder'];
if (!empty($jsonOutputPlaceholder)) {
$jsonerrors = array(
'errors' => array(),
Expand Down

0 comments on commit 8aa0feb

Please sign in to comment.