incorrect display of the pilot name

Please report bugs here, please be very detailed in your bug reports. If you've come up with some code to fix the bug, please post it here.
Post Reply
unrealalex
Noob
Posts: 9
Joined: Wed Jan 13, 2010 18:37

incorrect display of the pilot name

Post by unrealalex » Fri Sep 15, 2017 11:02

KB version 4.2.33.0 (YC-119-7 1.0)

If the pilot's name contains a dash, then it is displayed incorrectly on the pilot detail and kill detail pages.
Problem code in class.pilot.php at line 140:

Code: Select all

                        // Hacky, hacky, hack hack
                        // TODO: Fix this and change old kills to suit.
                        $pos = strpos($this->name, "- ");
                        if ($pos === false) return $this->name;
                        else if (strpos($this->name, "Moon") == false)
                                return substr($this->name, $pos + 2);
                        else return $this->name;
if the pilot name for example "In-Name- Dash", the function getName() returns "Dash".

User avatar
Salvoxia
Developer
Posts: 1436
Joined: Wed Feb 22, 2012 12:11

Re: incorrect display of the pilot name

Post by Salvoxia » Wed Sep 20, 2017 16:26

Oh dear, now the chickens come home to roost. I'll try to figure something out.
Thanks for reporting!

Best Regards,
Salvoxia

Post Reply

Return to “Bug Reporting”

Who is online

Users browsing this forum: No registered users and 7 guests