]> Kevux Git Server - koopa/commit
Bugfix: regular expression parsing logic for error message translation is incorrect
authorKevin Day <thekevinday@gmail.com>
Sat, 3 Feb 2018 05:56:06 +0000 (23:56 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 3 Feb 2018 05:56:06 +0000 (23:56 -0600)
commit158beca70fd07c90fefbd98211223e4ac4a439c0
tree9f334b8d10a9820600ce8c34a41934fff2ff5894
parenta09ca46fcfd7ce900c10e6d0af72819bc3b491d6
Bugfix: regular expression parsing logic for error message translation is incorrect

preg_replace() may return a non-string, so validate its value before replacing.
- if something goes wrong, then keep original string.

With the use of arguments that begin with ':{' and end with '}', the '/b' command is preventing the regular expressions from working.

If the detail value is not a string, instread provide an empty string for replacement.
common/base/classes/base_error_messages_english.php
common/base/classes/base_error_messages_japanese.php