I'm trying to include a variable in an .ini file, enclosing it with curly braces, and Zend complains that it cannot parse it correctly on Linux. It works correctly on Windows:
welcome_message = Welcome, {0}.
This is the error that occurs on Linux:
: Uncaught exception 'Zend_Config_Exception' with message 'Error parsing /var/www/html/portal/application/configs/language/messages.ini on line 10 ' in /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php:181 Stack trace: 0 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(201): Zend_Config_Ini->_parseIniFile('/var/www/html/p...') 1 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(125): Zend_Config_Ini->_loadIniFile('/var/www/html/p...') 2 /var/www/html/portal/library/Ingrain/Language/Base.php(49): Zend_Config_Ini->__construct('/var/www/html/p...', NULL) 3 /var/www/html/portal/library/Ingrain/Language/Base.php(23): Ingrain_Language_Base->setConfig('messages.ini', NULL, NULL) 4 /var/www/html/portal/library/Ingrain/Language/Messages.php(7): Ingrain_Language_Base->__construct('messages.ini', NULL, NULL, NULL) 5 /var/www/html/portal/library/Ingrain/Helper/Language.php(38): Ingrain_Language_Messages->__construct() 6 /usr/local/zend/share/ZendFramework/library/Zend/Contr in
We may get an error to get away on Linux if we surround the braces with quotes, but this seems like a strange solution:
welcome_message = Welcome, "{"0"}".
Is there a better way to solve this problem for all platforms? Thank you for your help.
Dave
source share