Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17065

Emoji characters in MCP add feedback cause SQL error

XMLWordPrintable

      In the Moderator Control Panel when adding feedback, if the feedback contains an emoji then when it you Submit the feedback it generates a General Error 

       

      SQL ERROR [ mysqli ]
      Incorrect string value: '\xF0\x9F\x91\x8D";...' for column `phpbb_log`.`log_data` at row 1 [1366]
      SQL
      INSERT INTO phpbb_log (user_id, log_ip, log_time, log_operation, log_type, reportee_id, log_data) VALUES ('nnn', 'ip_addr', 1669642805, 'LOG_USER_GENERAL', 3, 158, 'a:1:{i:0;s:4:\"<thumbs_up emoji>\";}')
      BACKTRACE
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: msg_handler()
      FILE: [ROOT]/phpbb/db/driver/driver.php
      LINE: 1023
      CALL: trigger_error()
      FILE: [ROOT]/phpbb/db/driver/mysqli.php
      LINE: 202
      CALL: phpbb\db\driver\driver->sql_error()
      FILE: [ROOT]/phpbb/db/driver/factory.php
      LINE: 345
      CALL: phpbb\db\driver\mysqli->sql_query()
      FILE: [ROOT]/phpbb/log/log.php
      LINE: 317
      CALL: phpbb\db\driver\factory->sql_query()
      FILE: [ROOT]/includes/mcp/mcp_notes.php
      LINE: 173
      CALL: phpbb\log\log->add()
      FILE: [ROOT]/includes/mcp/mcp_notes.php
      LINE: 66
      CALL: mcp_notes->mcp_notes_user_view()
      FILE: [ROOT]/includes/functions_module.php
      LINE: 676
      CALL: mcp_notes->main()
      FILE: [ROOT]/mcp.php
      LINE: 345
      CALL: p_master->load_active()
       
      

      This can be reproduced here on phpbb.com

            Crizzo Crizzo
            P_I P_I
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: