Skip to content

Commit

Permalink
Test if year is an integer before doing math with it
Browse files Browse the repository at this point in the history
  • Loading branch information
sgladstone authored Aug 2, 2018
1 parent a79911b commit 75334b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/HebrewCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3757,6 +3757,7 @@ function util_get_bar_bat_mizvah_date(&$iyear, &$imonth, &$iday, &$ibeforesunse
}

$bar_bat_mitzvah_year = '';
if ( is_int( $hebrewbirthYear)){
if( $bar_bat_mitzvah_flag == 'bat'){
// Technically a girl can be done as early as 12, but most congregations wait until 13.
// TODO: Make this configurable by the congregation
Expand All @@ -3766,6 +3767,9 @@ function util_get_bar_bat_mizvah_date(&$iyear, &$imonth, &$iday, &$ibeforesunse
}else{
return "bar_bat_mitzvah_flag must be either bar or bat. " ;
}
}else{
return "";
}

//$tmpformat = 'MM dd, yy sunset';
if(strlen( $gregorian_date_format) > 0 ){
Expand Down

0 comments on commit 75334b1

Please sign in to comment.