What did line 161 look like before you added it? after?
This is what mine looks like now:
$knownDomsPat = "/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|\w{2,2})$/i";
At the end it already has: "\w{2,2}"
That should cover all two letter domains, including "es", "ca" or any other.... it doesn't make sense that that was the problem unless your line looked different than mine in the first place.... maybe something else you did fixed it?