What did you do?!?!?
Error: = $identifierError ?>
$username) { $players[$uuid] = new Player($uuid, $username); } return $players; } /** * @param $playersArray * @param $reportersArray * @return SplObjectStorage */ function toReporters($playersArray, $reportersArray) { $reporters = new SplObjectStorage(); foreach ($reportersArray as $reporterUUID => $reason) { $reporters[getPlayer($playersArray, $reporterUUID)] = $reason; } return $reporters; } /** * @param Player[] $players * @param String $uuid * @return Player */ function getPlayer($players, $uuid) { $player = $players[$uuid]; if ($player != null) { return $player; } else { throw new RuntimeException('Player for UUID not found.'); } } /** * @param String $dateTime * @param DateTimeZone $timezone * @return DateTime */ function parseDateTime($dateTime, $timezone) { return DateTime::createFromFormat(jsonDateTimeFormat, $dateTime, $timezone); } /** /** * Converts an interval to minutes, days or months, depending on the size. * * @param DateInterval $interval * @return string */ function approximateHumanInterval($interval) { if ($interval->m > 0) { return $interval->m . " months"; } else if ($interval->d > 0) { return $interval->d . " days"; } else if ($interval->h > 0) { return $interval->h . " hours"; } else { return $interval->i . " minutes"; } } /** * @param String $input * @return String */ function removeBadCharacters($input) { return preg_replace('/[^A-Za-z0-9_\-]/', '_', $input); } $validIdentifier = isset($_GET['identifier']); $identifierError = ""; $identifier = null; $filePath = null; $snapshot = null; $report = null; if ($validIdentifier) { $identifier = removeBadCharacters($_GET['identifier']); // prevents escaping $filePath = dataDir . $identifier . '.json'; if (file_exists($filePath)) { $dataArray = toDataArray($filePath); $snapshot = toSnapshot($identifier, $dataArray); $report = toReport($dataArray['report'], $snapshot->getPlayers()); } else { $validIdentifier = false; $identifierError = "Invalid identifier."; } } ?>
What did you do?!?!?
Error: = $identifierError ?>
= $player->getUUID() ?>