What potential issues could arise from using the current password generation function?

One potential issue with the current password generation function is that it may not be generating strong enough passwords, leaving them vulnerable to brute force attacks. To solve this issue, we can modify the function to include a mix of uppercase and lowercase letters, numbers, and special characters in the generated passwords.

function generateStrongPassword($length = 12) {
    $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+';
    $password = '';
    for ($i = 0; $i < $length; $i++) {
        $password .= $chars[rand(0, strlen($chars) - 1)];
    }
    return $password;
}