Update Password_generator.php

Explicitly ensure the array indices are defined.