Just to mention this, as I have now seen it in a couple places (here and some existing code).  This is for cleanup on a future rev, not needed for this patch, but str2bool('true') evaluates to the actual boolean value true, meaning that the '== true' part of the comparison is not needed.  This check will return true or false:
```
if str2bool($ssl)
```