Skip to content

AuthorsHistoryDAO::getAuthorsByEmail(): Argument #1 ($email) must be of type string #3

@evici

Description

@evici

In certain cases submission authors/contri butors might not have en email address. If that happen plugin throws fatal error:

Fatal error: Uncaught TypeError: APP\plugins\generic\authorsHistory\classes\AuthorsHistoryDAO::getAuthorsByEmail(): Argument #1 ($email) must be of type string, null given

I've tested this scenario and making $email string type optional fixes the problem.

File: authorsHistory/classes/AuthorsHistoryDAO.php
Line: 39
Function: getAuthorsByEmail

Fix:

private function getAuthorsByEmail(?string $email): array

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