Skip to content

Commit

Permalink
Merge pull request CobreGratis#2 from fabiorphp/master
Browse files Browse the repository at this point in the history
Modificação de todos os erros relacionados as funções split (deprecated) e ereg (deprecated). Foi alterado para explode e preg_match respectivamente.
  • Loading branch information
israelst committed Feb 4, 2012
2 parents ce7998f + 48c0e87 commit bd3e194
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion include/funcoes_bancoob.php
Expand Up @@ -181,7 +181,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
4 changes: 2 additions & 2 deletions include/funcoes_banespa.php
Expand Up @@ -43,7 +43,7 @@
$nossonumero = substr("0000000", strlen($dadosboleto['nosso_numero'])).$dadosboleto['nosso_numero'];

// Calcula vencimento juliano
$vencjuliano = dataJuliano($vencimento);
$vencjuliano = dataJuliano($data_venc);

// Calcula Campo Livre
$campoLivre = calculaCampoLivre($codigocliente.$nossonumero."00".$codigobanco);
Expand Down Expand Up @@ -204,7 +204,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_banestes.php
Expand Up @@ -192,7 +192,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_bb.php
Expand Up @@ -212,7 +212,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_besc.php
Expand Up @@ -219,7 +219,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_bradesco.php
Expand Up @@ -209,7 +209,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_cef_sigcb.php
Expand Up @@ -218,7 +218,7 @@ function direita($entra,$comp){

function fator_vencimento($data) {
if ($data != "") {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_cef_sinco.php
Expand Up @@ -210,7 +210,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_hsbc.php
Expand Up @@ -217,7 +217,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_itau.php
Expand Up @@ -185,7 +185,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_nossacaixa.php
Expand Up @@ -267,7 +267,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_real.php
Expand Up @@ -191,7 +191,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_santander_banespa.php
Expand Up @@ -213,7 +213,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_sicredi.php
Expand Up @@ -240,7 +240,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down
4 changes: 2 additions & 2 deletions include/funcoes_sudameris.php
Expand Up @@ -170,7 +170,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down Expand Up @@ -306,7 +306,7 @@ function monta_linha_digitavel($dados) {
// 31 a 34 Fator de vencimento
// 35 a 44 Valor

if (ereg('^([0-9]{5})([0-9]{4})([0-9]{5})([0-9]{5})([0-9]{5})([0-9]{5})([0-9]{1})([0-9]{4})([0-9]{10})$', $dados, $bloco))
if (preg_match('/^([0-9]{5})([0-9]{4})([0-9]{5})([0-9]{5})([0-9]{5})([0-9]{5})([0-9]{1})([0-9]{4})([0-9]{10})$/', $dados, $bloco))
{
$dv1 = modulo_10($bloco[1] . $bloco[2]);
if ($dv1 == 10) $dv1 = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/funcoes_unibanco.php
Expand Up @@ -192,7 +192,7 @@ function direita($entra,$comp){
}

function fator_vencimento($data) {
$data = split("/",$data);
$data = explode("/",$data);
$ano = $data[2];
$mes = $data[1];
$dia = $data[0];
Expand Down

0 comments on commit bd3e194

Please sign in to comment.