Dean O

Dean O

Joined
Jun 07, 2012

Activity Stream

Dean O commented on a Page, duration()  -  Jun 07, 2012

Should put $duration = array() at the top. Initializing duration will output an empty string when $period is 0 or you otherwise get an error. Useful in situations where you calculate the duration of something that may not have started yet and makes it a bit more solid and stable overall by covering this edge case.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.