Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14951

Emoji characters causing SQL errors while submitting post

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Invalid
    • 3.2.0-RC2
    • None
    • Posting
    • None
    • PHP5 and PHP7, iOS10

    Description

      Some emoji characters are causing SQL errors when the post is being submit. Preview is possible. Please see attached screenshots.
      Error Message:

      General Error
      SQL ERROR [ mysqli ]

      Incorrect string value: '\xE2\x86\x94\xEF\xB8\x8F...' for column 'post_text' at row 1 [1366]

      SQL

      INSERT INTO phpbb3_posts (forum_id, poster_id, icon_id, poster_ip, post_time, post_visibility, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, post_username, post_subject, post_text, post_checksum, post_attachment, bbcode_bitfield, bbcode_uid, post_postcount, post_edit_locked, topic_id) VALUES (48, 5201, 0, '213.39.138.18', 1483342831, 1, 1, 1, 1, 1, '', 'Re: Test emojis', '<r>Test<br/>\n<EMOJI seq=\"2194\">↔️</EMOJI><EMOJI seq=\"1f500\">🔀</EMOJI><EMOJI seq=\"2935\">⤵️</EMOJI></r>', '5a0d2573402f1e7568708d97b2c564a8', 0, '', '33whs5aw', 1, 0, 12491)

      BACKTRACE

      FILE: (not given by php)
      LINE: (not given by php)
      CALL: msg_handler()

      FILE: [ROOT]/phpbb/db/driver/driver.php
      LINE: 999
      CALL: trigger_error()

      FILE: [ROOT]/phpbb/db/driver/mysqli.php
      LINE: 193
      CALL: phpbb\db\driver\driver->sql_error()

      FILE: [ROOT]/phpbb/db/driver/factory.php
      LINE: 329
      CALL: phpbb\db\driver\mysqli->sql_query()

      FILE: [ROOT]/includes/functions_posting.php
      LINE: 1844
      CALL: phpbb\db\driver\factory->sql_query()

      FILE: [ROOT]/posting.php
      LINE: 1414
      CALL: submit_post()

      Attachments

        1. image1.PNG
          image1.PNG
          145 kB
        2. image2.PNG
          image2.PNG
          45 kB

        Activity

          People

            Unassigned Unassigned
            Saint_hh Saint_hh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: