Skip to content

Commit

Permalink
Merge pull request #659 from greezybacon/issue/652
Browse files Browse the repository at this point in the history
forms: Better failsafe for __toString

Reviewed-By: Peter Rotich <peter@osticket.com>
  • Loading branch information
protich committed Mar 6, 2014
2 parents b26f99e + 070cb4b commit 0876102
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/class.dynamic_forms.php
Expand Up @@ -729,7 +729,8 @@ function asVar() {
}

function __toString() {
return $this->toString();
$v = $this->toString();
return is_string($v) ? $v : (string) $this->getValue();
}
}

Expand Down

0 comments on commit 0876102

Please sign in to comment.