Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix - birth name #302

Open
GeorgeFive opened this issue Apr 12, 2023 · 0 comments
Open

Quick fix - birth name #302

GeorgeFive opened this issue Apr 12, 2023 · 0 comments

Comments

@GeorgeFive
Copy link

GeorgeFive commented Apr 12, 2023

Function currently does not work. Quick and easy, remove:

\s*

...from line 492 and it works as expected.

Nicknames:

public function nickname()
{
    if (empty($this->nick_name)) {
        $this->getPage("Bio");
        if (preg_match("!Nicknames</td>\s*<td>\s*(.*?)</td>\s*</tr>!ms", $this->page["Bio"], $match)) {
            $nicks = explode("<br>", $match[1]);
            foreach ($nicks as $nick) {
                $nick = trim($nick);
                if (!empty($nick)) {
                    $this->nick_name[] = $nick;
                }
            }
        } elseif (preg_match('!Nickname</td><td>\s*([^<]+)\s*</td>!', $this->page["Bio"], $match)) {
            $this->nick_name[] = trim($match[1]);
        }
    }
    return $this->nick_name;
}

Note that there are two versions of the bio page (see #303).... this works on the old bio page, but not on the new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant