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

Calling confirm_box in some events produce errors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 3.2.1
    • None
    • Events
    • None

    Description

       

          static public function getSubscribedEvents()
          {
              return array(
       
                  'core.modify_posting_parameters'            => 'core_modify_posting_parameters',
              );
          }

          public function core_modify_posting_parameters($event)
          {
              $mode = $event['mode'];
       
              if ($mode == 'post' || $mode == 'reply' || $mode == 'quote')
              {            
                  if (!confirm_box(true))
                  {
                      $s_hidden_fields = build_hidden_fields(array(
                          'mode'    => $mode,
                          'topic_id'    => $topic_id,
                          'post_id'    => $post_id,
                          'draft_id'    => $draft_id,
                          'forum_id'    => $forum_id,
                          'submit'    => $submit)
                      );
       
                      confirm_box(false, $this->user->lang['ARE_YOU_WANT_TO_POST'], $s_hidden_fields);
                  }
              }
          }
      

      This is results in:
      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/user.php on line 619: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given

      Fatal error: Call to a member function getName() on null in /var/www/ninjaturtles/data/www/ninjaturtles.ru/test/includes/functions.php on line 4316

      After pressing Reply button.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Shredder Shredder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: