Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
compability
Browse files Browse the repository at this point in the history
  • Loading branch information
seyfer committed May 14, 2015
1 parent 233b376 commit 07549da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/TwbBundle/Form/View/Helper/TwbBundleFormButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ public function render(ElementInterface $oElement, $sButtonContent = null)
*/
if (null === $sButtonContent) {
$sButtonContent = $oElement->getValue();

if (!$sButtonContent) {
$sButtonContent = $oElement->getLabel();
}

if (null === $sButtonContent && !$aIconOptions) {
throw new DomainException(sprintf(
'%s expects either button content as the second argument, ' .
Expand Down

0 comments on commit 07549da

Please sign in to comment.