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

purge_notifications() fails for disabled extensions

    Details

      Description

      The purge_notifications() method fails when run on an extension that is disabled.

      This is because when it tries to get the id for the notification type, in the get_notification_type_id() an error is thrown, because the extension is disabled.

      Thus, it's not possible to actually use purge_notifications() during the purge step of deleting an extension from the DB.

        Activity

        Hide
        nicofuma nicofuma added a comment -

        i don't see any acceptable solution. So I think that the best should be to call purge_notifications during the pre_disable step.

        Show
        nicofuma nicofuma added a comment - i don't see any acceptable solution. So I think that the best should be to call purge_notifications during the pre_disable step.
        Hide
        VSE Matt Friedman added a comment - - edited

        That's not a good solution, because you don't want to wipe out all notifications an extension may have sent, just when disabling an extension.

        We found a work-around, in our extension, but a solution would be better if possible, by catching any thrown errors:
        https://github.com/phpbb-extensions/boardrules/blob/master/ext.php#L101

        Show
        VSE Matt Friedman added a comment - - edited That's not a good solution, because you don't want to wipe out all notifications an extension may have sent, just when disabling an extension. We found a work-around, in our extension, but a solution would be better if possible, by catching any thrown errors: https://github.com/phpbb-extensions/boardrules/blob/master/ext.php#L101

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            VSE Matt Friedman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development