Ticket #618 (fixed bug)
Double ";" in functions.php
- Created: 2012-02-05 20:57:37
- Reported by: Ishimaru Chiaki
- Assigned to: daris
- Milestone: 1.4.9
- Component: code
- Priority: normal
Hello,
While updating my local modded board using Meld to compare with a fresh 1.4.5 and a fresh 1.4.8, I noticed something weird in include/functions.php file in a 1.4.8 fresh package :
//
// Converts the file size in bytes to a human readable file size
//
function file_size($size)
{
global $lang_common;
$units = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');
for ($i = 0; $size > 1024; $i++)
$size /= 1024;
return sprintf($lang_common['Size unit '.$units[$i]], round($size, 2));;
}
On this line :
return sprintf($lang_common['Size unit '.$units[$i]], round($size, 2));;
At the end, we see a ";;" instead of ";"
I want confirmation that it is a bug, for I learned that PHP instructions must be ended by only one ";".
Thanks in advance.
Ishimaru
History
daris 2012-02-06 08:28:12

- Milestone set to 1.4.9.
- Owner set to daris.
Ishimaru Chiaki wrote:
I want confirmation that it is a bug, for I learned that PHP instructions must be ended by only one ";".
It's not a syntax error, the ";" char separates instructions, in that case the last instruction is just empty