Cannot create trigger if item key contains multibyte characters and mbstring.func_overload is greater than 1

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Major
    • None
    • Affects Version/s: 2.0.12rc1, 2.2.3rc1, 2.3.0
    • Component/s: API (A)

      mbstring.func_overload can only be set in php.ini, so set value to 2 or greater.

      Having a valid multibyte key (since ZBX-4218) for example ' log[/var/log/syslog,\'???\',"UTF-8",100] ', adding it to trigger will produce error like ' Incorrect item key "log[/var/log/syslog,\'???\',"UTF-8",100].last(" '.

      For 2.2 you can also create a web scenario with name like "åäö" or "???". Then create a trigger and select one of the created web items. For example ' Download speed for scenario "åäö" '.
      Using frontend pop-up will display error: ' Incorrect trigger function "t()}=0" provided in expression. Unknown function. ' or you can enter expression manually and displayed error will be ' Incorrect item key "web.test.in[???,,bps].last(" '.

      Having mbstring.func_overload > 2, instead of substr() mb_substr() function will be used. Due to mb_ function cutting expression somewhere else, it cannot correctly determine expression parts which one is the key and which one is the function etc.

            Assignee:
            Unassigned
            Reporter:
            Ivo Kurzemnieks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: