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

Array to string conversion when permanently deleting a post

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.6-RC1
    • 3.2.5
    • Other
    • None

      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).

       

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

              Created:
              Updated:
              Resolved: