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

Commit

Permalink
Merge pull request #57 from moderndeveloperllc/master
Browse files Browse the repository at this point in the history
Allow for a blank message to be sent to the alert helper
  • Loading branch information
neilime committed Mar 1, 2014
2 parents eabfd43 + 2333396 commit 88dce5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TwbBundle/View/Helper/TwbBundleAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class TwbBundleAlert extends \Zend\Form\View\Helper\AbstractHelper{
* @return string|\TwbBundle\View\Helper\TwbBundleAlert
*/
public function __invoke($sAlertMessage = null, $aAlertAttributes = null, $bDismissable = false){
if(!$sAlertMessage)return $this;
if($sAlertMessage === null) return $this;
if($sAlertMessage === '' || $sAlertMessage === false) return '';
return $this->render($sAlertMessage,$aAlertAttributes,$bDismissable);
}

Expand Down

0 comments on commit 88dce5b

Please sign in to comment.