MY_language_helper.php

edited December 2016 in Bug Reports
I'm not sure if this is a bug or not, but having just added the Ion Auth library and views to a Fuel install (most recent) I've found that the Ion Auth lang files that feature a percent character for string replacement need doubling up to work: eg

$lang['change_password_new_password_label'] = 'New Password (at least %s characters long):';

will throw an error in sprintf() in that library's views, but

$lang['change_password_new_password_label'] = 'New Password (at least %%s characters long):';

will work as intended.

Ion Auth views / Controller uses sprintf() with nested lang() functions, and I think there is an initial parse happening in MY_language_helper which prematurely requires a replacement string, which is only supplied in the view or controller.

Comments

  • edited 11:41AM
    FUEL overwrites the lang function to allow for the passing variables to the language line using sprintf which I believe Ion Auth handles already.
Sign In or Register to comment.