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

JavaScript console throws error when alert message title is not defined (core.js bug)

    XMLWordPrintable

Details

    Description

      On line 309 of core.js there's a check:

      if (typeof res.MESSAGE_TITLE !== 'undefined') {
      	alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
      } else {
      	dark.fadeOut(phpbb.alertTime);
      }
      

      On lines 333-337 the code is to hide alert on page refresh but there's no check if alert is undefined:

      // Hide the alert even if we refresh the page, in case the user
      // presses the back button.
      dark.fadeOut(phpbb.alertTime, function() {
      	alert.hide();
      });

      Thus, if 'MESSAGE_TITLE' is not defined, JS console (Firebug/etc) throws error on page refresh:

      TypeError: alert is undefined
      alert.hide()

      Attachments

        Activity

          People

            bantu Andreas Fischer [X] (Inactive)
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: