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

修复Warning

显式数组扩容;
比较前先判断字符串长度;
parent 4359f728
......@@ -1220,7 +1220,10 @@ function runquery($sql) {
foreach(explode(";\n", trim($sql)) as $query) {
$queries = explode("\n", trim($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++;
}
......@@ -1312,4 +1315,4 @@ function setconfig($string) {
return $string;
}
?>
\ No newline at end of file
?>
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