Piotr Labudda 9 лет назад
Родитель
Сommit
311979343d
3 измененных файлов с 11 добавлено и 0 удалено
  1. 1 0
      SE/procesy5.php
  2. 4 0
      SE/se-lib/DebugExecutionTime.php
  3. 6 0
      SE/se-lib/V.php

+ 1 - 0
SE/procesy5.php

@@ -1011,6 +1011,7 @@ function task_PROCES_VIEW_LIST() {
 
 	?>
 	<style type="text/css">
+.proces-list-item-view { clear:both; }
 .proces-list-view-image { float:right; padding:0 0 8px 8px; clear:right; }
 	</style>
 	<div class="container">

+ 4 - 0
SE/se-lib/DebugExecutionTime.php

@@ -24,6 +24,9 @@ class DebugExecutionTime {
 		$this->_isActive = true;
 	}
 
+	/*
+	 * @param $msg string or NULL (NULL to log only group stats)
+	 */
 	public function log($msg, $groups = array()) {
 		if (!$this->_isActive) return;
 		$curTime = microtime(true);
@@ -76,6 +79,7 @@ class DebugExecutionTime {
 			</tfoot>
 			<tbody>
 				<?php foreach ($this->_log as $log) : ?>
+					<?php if (null === $log[0]) continue; ?>
 					<tr>
 						<td><?php echo $log[0]; ?></td>
 						<td style="font-family:monospace;text-align:right;"><?php echo number_format($log[1], 6); ?></td>

+ 6 - 0
SE/se-lib/V.php

@@ -13,6 +13,12 @@ class V {
 	public static function get($name, $default, $from, $type = '', $filterCallback = null) {
 		if (empty($name)) return null;
 		$ret = null;
+		if (is_bool($name)) $name = (int)$name;
+		if (!is_string($name) && !is_numeric($name)) {
+			//var_dump($name);
+			//echo'<pre>';print_r(debug_backtrace());echo'</pre>';
+			throw new Exception("Error name is not scalar! '{$name}'");
+		}
 		if (is_array($from)) {
 			if (array_key_exists($name, $from)) {
 				$ret = $from[$name];