Commit 1c8f7087 authored by Bridge Liu's avatar Bridge Liu Committed by GitHub

修复Warning

显式数组扩容;
比较前先判断字符串长度;
parent 4359f728
...@@ -1220,7 +1220,10 @@ function runquery($sql) { ...@@ -1220,7 +1220,10 @@ function runquery($sql) {
foreach(explode(";\n", trim($sql)) as $query) { foreach(explode(";\n", trim($sql)) as $query) {
$queries = explode("\n", trim($query)); $queries = explode("\n", trim($query));
foreach($queries as $query) { foreach($queries as $query) {
$ret[$num] .= $query[0] == '#' || $query[0].$query[1] == '--' ? '' : $query; if (count($ret) == $num) {
$ret[] = '';
}
$ret[$num] .= strlen($query)<2 || $query[0] == '#' || $query[0].$query[1] == '--' ? '' : $query;
} }
$num++; $num++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment