From a94581e7cae2e7fac6f88b8718866f694e8b01f0 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 15 Jun 2014 21:52:25 +0200 Subject: [PATCH] [ticket/12721] Add Squiz.ControlStructures.ForLoopDeclaration in legacy PHPBB3-12721 --- build/code_sniffer/ruleset-php-legacy.xml | 3 +++ phpBB/includes/functions_convert.php | 2 +- phpBB/search.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml index f060e8e14f..3a1d849135 100644 --- a/build/code_sniffer/ruleset-php-legacy.xml +++ b/build/code_sniffer/ruleset-php-legacy.xml @@ -51,6 +51,9 @@ + + + diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index e8f8151d6f..9005c57c8a 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -2297,7 +2297,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals $message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message); $message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message); - for ($i = sizeof($size); $i; ) + for ($i = sizeof($size); $i;) { $i--; $message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message); diff --git a/phpBB/search.php b/phpBB/search.php index 91ea21909d..f1f02ac766 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1256,7 +1256,7 @@ $s_characters .= ''; $s_characters .= ''; $s_characters .= ''; -for ($i = 100; $i <= 1000 ; $i += 100) +for ($i = 100; $i <= 1000; $i += 100) { $selected = ($i == 300) ? ' selected="selected"' : ''; $s_characters .= '';