Booleanize!

I am using Smarty Templates extensively in a custom application. The application relies heavily on both PHP .ini and Smarty .conf files.

The .conf files had boolean settings, meaning values set to the literal strings of “true” and “false”, and when I read them in, with $smarty->config_load(’file.conf’);, my booleans were converted into either nothing (false) or 1 (true). I am using them as literals - so the conversion was not good.

I just started looking into changing my code to compensate, when I decided to review the Smarty documentation again. The booleanize setting allows you to disable the conversion from false to nothing and true to 1.

An enthusiastic thank you to the Smarty team!

:D