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

Fatal error entering UCP if bookmarked topic was deleted

    XMLWordPrintable

Details

    Description

      Before phpBB 3.0.8 bookmarks weren't deleted together with the related topic (see https://tracker.phpbb.com/browse/PHPBB3-9546 and https://github.com/phpbb/phpbb/commit/d8b4c0db0cfd8fc4fb655020b7e9743c04d64df9).
      If the board is an update from phpBB < 3.0.8, having deleted topics bookmarked cause fatal error when entering UCP, f.e.:

      Fatal error: Uncaught exception 'Exception' with message 'DateTime::_construct(): Failed to parse time string (@) at position 0 (@): Unexpected character' in /var/www/site/data/www/www.forum.site.ru/phpbb/datetime.php:50 Stack trace: #0 /var/www/site/data/www/www.forum.site.ru/phpbb/datetime.php(50): DateTime->construct('@', Object(DateTimeZone)) #1 /var/www/site/data/www/www.forum.site.ru/phpbb/user.php(720): phpbb\datetime->_construct(Object(phpbb\user), '@', Object(DateTimeZone)) #2 /var/www/site/data/www/www.forum.site.ru/includes/ucp/ucp_main.php(802): phpbb\user->format_date(NULL) #3 /var/www/site/data/www/www.forum.site.ru/includes/ucp/ucp_main.php(436): ucp_main->assign_topiclist('bookmarks', Array) #4 /var/www/site/data/www/www.forum.site.ru/includes/functions_module.php(674): ucp_main->main('main', 'bookmarks') #5 /var/www/site/data/www/www.forum.site.ru/ucp.php(369): p_master->load_active() #6 {main} thrown in /var/www/site/data/www/www.forum.site.ru/phpbb/datetime.php on line 50

      This is because topic_time passed to the DateTime() constructor doesn't exist, but rather than catching exception the core currently just throws fatal error in case timestamp is not valid https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/phpbb/datetime.php#L50.

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              rxu rxu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: