Fix deprecated code

This commit is contained in:
Laurent Destailleur 2015-04-07 02:48:19 +02:00
parent c931576e0e
commit ad50810c7a

View File

@ -120,12 +120,12 @@ function bank_admin_prepare_head($object)
* Check SWIFT informations for a bank account * Check SWIFT informations for a bank account
* *
* @param Account $account A bank account * @param Account $account A bank account
* @return boolean True if informations are valid, false otherwise * @return boolean True if informations are valid, false otherwise
*/ */
function checkSwiftForAccount($account) function checkSwiftForAccount($account)
{ {
$swift = $account->bic; $swift = $account->bic;
if (eregi("^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$", $swift)) { if (preg_march("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) {
return true; return true;
} else { } else {
return false; return false;