* Functions.php:
(BSFunctions::FetchMicrotimeDiff): Refactored the local vars
* Template.php:
(BSTemplate::fetch): Fixed a warning generated by the uncached template counter
(BSTemplate::flush): Fixed a warning about the microtime diff because we weren't passing a microtime, just the seconds
public static function FetchMicrotimeDiff($mtstart)
{
$mtend = microtime();
- list ($starttime['micro'], $starttime['sec']) = explode(' ', $mtstart);
- list ($endtime['micro'], $endtime['sec']) = explode(' ', $mtend);
- return ($endtime['micro'] + $endtime['sec']) - ($starttime['micro'] + $starttime['sec']);
+ list($startMicro, $startSec) = explode(' ', $mtstart);
+ list($endMicro, $endSec) = explode(' ', $mtend);
+ return ($endMicro + $endSec) - ($startMicro + $startSec);
}
// ###################################################################
}
else
{
- $this->uncached[$name]++;
+ $this->uncached[$name] = (isset($this->uncached[$name]) ? $this->uncached[$name] + 1 : 0);
BSApp::Debug("Manually loading template '$name'");
$template = $this->_loadTemplate($name);
$template = $this->_parseTemplate($template);
$debugBlock = '';
if (BSApp::GetDebug())
{
- $debugBlock .= "\n<div align=\"center\">Executed in " . round(BSFunctions::FetchMicrotimeDiff($_SERVER['REQUEST_TIME']), 10) . ' seconds</div>';
+ $debugBlock .= "\n<div align=\"center\">Executed in " . round(BSFunctions::FetchMicrotimeDiff('0 ' . $_SERVER['REQUEST_TIME']), 10) . ' seconds</div>';
$debugBlock .= "\n<br /><div align=\"center\">" . BSApp::GetDebugList() . "</div>";
if (sizeof($this->uncached) > 0)