In the provided PHP code, what change was made to the getGeheimzahl method to resolve the issue?

Issue: The getGeheimzahl method was returning a string instead of an integer, causing a type mismatch error when trying to compare the result with an integer. Solution: To resolve the issue, we need to explicitly convert the string returned by the getGeheimzahl method to an integer using the intval function before returning it.

class GeheimzahlGenerator {
    public function getGeheimzahl() {
        return intval("1234");
    }
}

$generator = new GeheimzahlGenerator();
$geheimzahl = $generator->getGeheimzahl();

if ($geheimzahl === 1234) {
    echo "Correct geheimzahl!";
} else {
    echo "Incorrect geheimzahl!";
}