Skip to content

Trying to clear effects of a round where username does not exist throws an exception. #1576

@srjfoo

Description

@srjfoo

Specific example:

When clearing pages in a project, I accidentally selected a page that was a blank inserted while the project had pages in F1.page_avail, so the proofer name inserted was [none]. Since the username didn't exist, it couldn't have any data associated with it cleared, so the following exception was thrown:

No user found with username = [none]

Fatal error:  Uncaught NonexistentUserException: No user found with username = [none] in /data/htdocs/c/pinc/User.inc:259
Stack trace:
#0 /data/htdocs/c/pinc/User.inc(141): User->load()
#1 /data/htdocs/c/pinc/page_tally.inc(58): User->__construct()
#2 /data/htdocs/c/tools/project_manager/page_operations.inc(73): page_tallies_add()
#3 /data/htdocs/c/tools/project_manager/edit_pages.php(62): page_clear()
#4 {main}
  thrown in /data/htdocs/c/pinc/User.inc on line 259

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions