[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins / verifier / verifier / telephone.php
index 70ed47a..35065ff 100644 (file)
@@ -42,7 +42,8 @@ function verifier_telephone_dist($valeur, $options = array()) {
                $tel = preg_replace($prefixe_CH, '0', $tel);
        }
 
-       switch ($options['pays']) {
+       $pays = isset($options['pays']) ? $options['pays'] : null;
+       switch ($pays) {
                case 'CH':
                        if (!preg_match('/^0[1-9]{9}$/', $tel)) {
                                return $erreur;