From: Anne Limoges Date: Sun, 3 Nov 2013 08:59:47 +0000 (+0100) Subject: Replace deprecated ereg() by preg_match() X-Git-Tag: xorg/1.1.10~20 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f1995a1ec228651bf26ebc4a5da19d55b932c45c;p=platal.git Replace deprecated ereg() by preg_match() --- diff --git a/modules/payment.php b/modules/payment.php index 9a878dd..eb2a941 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -251,7 +251,7 @@ class PaymentModule extends PLModule } /* on extrait la reference de la commande */ - if (!ereg('-([0-9]+)$', Env::v('vads_order_id'), $matches)) { + if (!preg_match('/-([0-9]+)$/', Env::v('vads_order_id'), $matches)) { cb_erreur("référence de commande invalide"); } @@ -362,7 +362,7 @@ class PaymentModule extends PLModule } /* on extrait la reference de la commande */ - if (!ereg('-xorg-([0-9]+)$', $fullref, $matches)) { + if (!preg_match('/-xorg-([0-9]+)$/', $fullref, $matches)) { paypal_erreur("référence de commande invalide"); } @@ -1027,7 +1027,7 @@ class PaymentLogsImporter extends CSVImporter { return null; } $reference = self::getValue($line, 'reference', $relation['reference']); - if (ereg('-([0-9]+)$', $reference, $matches)) { + if (preg_match('/-([0-9]+)$/', $reference, $matches)) { return $matches[1]; } else { return null;