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

Commit

Permalink
Actually, we want false to return a blank string. Make sure a numeric…
Browse files Browse the repository at this point in the history
… zero would be passed for rendering.
  • Loading branch information
moderndeveloperllc committed Feb 25, 2014
1 parent 3bb712b commit 2333396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TwbBundle/View/Helper/TwbBundleAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TwbBundleAlert extends \Zend\Form\View\Helper\AbstractHelper{
*/
public function __invoke($sAlertMessage = null, $aAlertAttributes = null, $bDismissable = false){
if($sAlertMessage === null) return $this;
if($sAlertMessage == '') return '';
if($sAlertMessage === '' || $sAlertMessage === false) return '';
return $this->render($sAlertMessage,$aAlertAttributes,$bDismissable);
}

Expand Down

0 comments on commit 2333396

Please sign in to comment.