Skip to content

Commit

Permalink
馃敤 BASE #280 PHP 8.2 corre莽茫o utf8_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Feb 20, 2023
1 parent 8e3e6ab commit 316e37b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions base/callbacks/combinarSelects.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
}

function combinarSelectIsUTF8($string) {
return (utf8_encode(utf8_decode($string)) == $string);
return (StringHelper::utf8_encode(StringHelper::utf8_decode($string)) == $string);
}

if( isset( $_REQUEST['descPrimeiraOpcao'] ) && combinarSelectIsUTF8( $_REQUEST['descPrimeiraOpcao'] ) ){
$_REQUEST['descPrimeiraOpcao'] = utf8_encode( $_REQUEST['descPrimeiraOpcao'] );
$_REQUEST['descPrimeiraOpcao'] = StringHelper::utf8_encode( $_REQUEST['descPrimeiraOpcao'] );
}

// executar pacote
Expand Down Expand Up @@ -84,14 +84,14 @@ function combinarSelectIsUTF8($string) {
$campoCodigo = strtoupper($_REQUEST['colunaCodigo']);
$campoDescricao = strtoupper($_REQUEST['colunaDescricao']);
$retorno='{"campo":"'.$_REQUEST['campoSelect'].
'","selectPai":"'.utf8_decode($_REQUEST['selectPai']).
'","valorInicial":"'.utf8_decode($_REQUEST['valorInicial']).
'","selectPai":"'.StringHelper::utf8_decode($_REQUEST['selectPai']).
'","valorInicial":"'.StringHelper::utf8_decode($_REQUEST['valorInicial']).
'","selectFilhoStatus":"'.$_REQUEST['selectFilhoStatus'].
'","descPrimeiraOpcao":"'.utf8_decode($_REQUEST['descPrimeiraOpcao']).
'","valorPrimeiraOpcao":"'.utf8_decode($_REQUEST['valorPrimeiraOpcao']).
'","descPrimeiraOpcao":"'.StringHelper::utf8_decode($_REQUEST['descPrimeiraOpcao']).
'","valorPrimeiraOpcao":"'.StringHelper::utf8_decode($_REQUEST['valorPrimeiraOpcao']).
'","funcaoExecutar":"'.$_REQUEST['funcaoExecutar'].
'","selectUniqueOption":"'.$_REQUEST['selectUniqueOption'].
'","descNenhumaOpcao":"'.utf8_decode($_REQUEST['descNenhumaOpcao']).'"';
'","descNenhumaOpcao":"'.StringHelper::utf8_decode($_REQUEST['descNenhumaOpcao']).'"';
// executar pacote
$pacoteCache = explode('|',$_REQUEST['pacoteOracle']);

Expand Down Expand Up @@ -167,8 +167,8 @@ function combinarSelectIsUTF8($string) {

if ( ! combinarSelectIsUTF8( $res[$campoDescricao][$k] ) )
{
$res[$campoDescricao][$k] = utf8_encode( $res[$campoDescricao][$k]);
$res[$campoCodigo][$k] = utf8_encode( $res[$campoCodigo][$k]);
$res[$campoDescricao][$k] = StringHelper::utf8_encode( $res[$campoDescricao][$k]);
$res[$campoCodigo][$k] = StringHelper::utf8_encode( $res[$campoCodigo][$k]);
}
}
if( !array_key_exists($campoCodigo,$res))
Expand Down

0 comments on commit 316e37b

Please sign in to comment.