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

BBCode UID Throwing Deprecation Errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.0.0-a1, 3.3.10
    • BBCode Engine
    • None

      We can't do this anymore:

      $this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);  

      As of PHP 7.4.0 supplying any invalid characters to base_convert() is deprecated (it only accepts numeric strings). Our unique_id() is creating alpha-numerical strings. The result is the following deprecation errors like:

      Deprecated: Invalid characters passed for attempted conversion,
      these have been ignored in string(7) "efaoh79"  

       
      I have NO idea what bbcode UID's ever were, and I don't even think they are needed anymore with the new bbcode engine. But we certainly need an alternative to this base_convert method.
       
      This is being done in the message_parser and functions_convert files.
       

            Unassigned Unassigned
            MattF Matt Friedman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: