Bug with switch case strutureDescription:
------------
switch($action){
case SALVAR:{
header("Location: ".site_url("empresas/edit/".$id.$refresh_call));
break;}
case SALVAR_INSERIR:{
header("Location: ".site_url("empresas/addnew".$refresh_call));
break;}
case SALVAR_FECHAR:{
if($refresh_call=='')
$call='window.opener.'.base64_decode($refresh_call).';';
echo $call.SCRIPT_FECHAR_JANELA;
break;}
}jonatas_fischer
jonatas_fischerhttp://pear.php.net/bugs/17313
PHP_CodeSniffer Bug
Reported by jonatas_fischer
2010-04-15T15:01:09+00:00
PHP: 5.3.2 OS: Windows Package Version: Unknown
Description:
------------
switch($action){
case SALVAR:{
header("Location: ".site_url("empresas/edit/".$id.$refresh_call));
break;}
case SALVAR_INSERIR:{
header("Location: ".site_url("empresas/addnew".$refresh_call));
break;}
case SALVAR_FECHAR:{
if($refresh_call=='')
$call='window.opener.'.base64_decode($refresh_call).';';
echo $call.SCRIPT_FECHAR_JANELA;
break;}
}]]>PHP_CodeSniffer Bug
Reported by jonatas_fischer
2010-04-15T15:01:09+00:00
PHP: 5.3.2 OS: Windows Package Version: Unknown
Description:
------------
switch($action){
case SALVAR:{
header("Location: ".site_url("empresas/edit/".$id.$refresh_call));
break;}
case SALVAR_INSERIR:{
header("Location: ".site_url("empresas/addnew".$refresh_call));
break;}
case SALVAR_FECHAR:{
if($refresh_call=='')
$call='window.opener.'.base64_decode($refresh_call).';';
echo $call.SCRIPT_FECHAR_JANELA;
break;}
}]]>2010-04-15T15:01:09+00:00
squiz [2010-04-19 01:49] http://pear.php.net/bugs/17313#1271641746
<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: squiz</span>
</div>This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
For those maybe wondering what the issue was:
When you run this with the Squiz standard you get a PHP notice from the
LongConditionClosingComment sniff because the case statements are using braces.
This sniff will now correctly process these sort of CASE statements and require
comments for long CASE statements that use braces.]]><div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: squiz</span>
</div>This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
For those maybe wondering what the issue was:
When you run this with the Squiz standard you get a PHP notice from the
LongConditionClosingComment sniff because the case statements are using braces.
This sniff will now correctly process these sort of CASE statements and require
comments for long CASE statements that use braces.]]>2010-04-19T01:49:06+00:00