Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-2023 now.

Use of functions against Coding Guidelines 3/19/07 CVS (fix completed in vcs)

Looking at the coding guidelines, I found these problems:

includes\acp\acp_database.php (1185): Uses count() function rather than sizeof()
includes\functions_convert.php (1277): Uses count() function rather than sizeof()
includes\functions_upload.php (58): Uses srtstr() function rather than strpos()
includes\acm\acm_file.php (180): Brackets on the same line as if statement. Technically, this being written to another file, so is not too important, but might need to follow the readability guidelines
includes\acm\acm_file.php (368): Same
includes\functions_template.php (348): Same
includes\functions_template.php (512): Same
install\convertors\convert_phpbb20.php (287): Brackets on the same line as if statement, but this is not generated code.
includes\acm\acm_file.php (393): Uses ++ operator in a return statement
includes\acp\auth.php (46): Uses ++ operator in assignment
includes\acp\auth.php (51): Same
includes\auth.php (45): Same
includes\auth.php (50): Same
includes\diff\engine.php (155): Uses ++ operator with array key
includes\diff\engine.php (168): Same
includes\diff\engine.php (174): Same
includes\diff\engine.php (313): Same
includes\diff\engine.php (385): Same
includes\diff\engine.php (390): Same
includes\diff\engine.php (460): Uses ++ operator in while statement
includes\diff\engine.php (497): Uses ++ operator with array key
includes\diff\engine.php (498): Same
includes\functions_admin.php (2639): Uses ++ operator in assignment
includes\functions_convert.php (67): Uses ++ operator in return
includes\functions_template.php (612): Uses ++ operator with array key
includes\functions_template.php (625): Same
includes\functions_template.php (638): Same
includes\mcp\mcp_queue.php (267): Uses ++ operator in assignment
includes\mcp\mcp_reports.php (291): Same
includes\ucp\ucp_groups.php (304): Uses ++ operator assigning template variables
includes\ucp\ucp_groups.php (358): Same
includes\ucp\ucp_pm_options.php (767): Same
includes\utf\utf_normalizer.php (241): Uses ++ operator in assignment
includes\utf\utf_normalizer.php (287): Uses ++ operator in array key
includes\utf\utf_normalizer.php (341): Uses ++ operator in assignment
includes\utf\utf_normalizer.php (432): Same
includes\utf\utf_normalizer.php (756): Same
includes\utf\utf_normalizer.php (767): Same
includes\utf\utf_normalizer.php (841): Uses ++ operator in while loop
includes\utf\utf_normalizer.php (874): Uses ++ in if statement
includes\utf\utf_normalizer.php (878): Uses ++ operator in assignment
includes\utf\utf_normalizer.php (879): Uses ++ operator in array key
includes\utf\utf_normalizer.php (883): Same
includes\utf\utf_normalizer.php (1178): Uses ++ operator in assignment
includes\utf\utf_normalizer.php (1432): Same
includes\utf\utf_normalizer.php (1438): Same

I know some of these would need more coding for a work around, and by no means should all of them be replaced.

That's all!... For now :P

Comments / History

Linked ticket with changeset: r7211

Action performed by DavidMJ (Former Team Member) on Mar 20th 2007, 03:40

Posted by DavidMJ (Former Team Member) on Mar 20th 2007, 03:42

One or two have been invalidated due to portions of code rewritten. strstr() is allowed if it is used for its functionality, not to detect if a string exists within another string (this is how it is used in this case). Pre or post increment usage is used as in some cases the other way of doing it is less usable. Sometimes, it is used for performance reasons. Brackets on the same line do not apply to auto generated code ;-)

Assigned ticket to user "DavidMJ"

Action performed by DavidMJ (Former Team Member) on Mar 20th 2007, 03:42

Changed ticket status from "New" to "Fix completed in CVS"

Action performed by DavidMJ (Former Team Member) on Mar 20th 2007, 03:42

Edited ticket

Action performed by DavidMJ (Former Team Member) on Mar 20th 2007, 03:42

Ticket details

Related SVN changesets