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

Array to string conversion when permanently deleting a post

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.5
    • Fix Version/s: 3.2.6-RC1
    • Component/s: Other
    • Labels:
      None

      Description

      If a post is initially soft deleted and later on a user wants to permanently delete the post, there is a "string to array conversion" error. While the error is only thrown in my development environment (with twig debug enabled), it is still there.

      Soft deleted post: https://prnt.sc/m7kxvf

      When clicking on delete: https://prnt.sc/m7ky32

      And with Twig debug enabled: http://prntscr.com/m7kzzq

       

      The problem is that the language key send to confirm_box() is an array. Meaning that it has a plural form. 

      'DELETE_POST_PERMANENTLY'	=> array(
        1 => 'Permanently delete this post so it can not be recovered',
        2 => 'Permanently delete %1$d posts so they can not be recovered',
      ),

      Therefore I propose to allow sending an array to the confirm_box() language string, which will allow sending parameters for plural form (or for other things aswell such as %s).

       

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              mrgoldy mrgoldy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: