few minor cleanups to last commit
This commit is contained in:
@@ -526,7 +526,8 @@ class MeekroDB {
|
||||
else return $this->escape($value);
|
||||
|
||||
} else if ($type == 'list') {
|
||||
if (is_array($value) && array_values($value) === $value) {
|
||||
if (is_array($value)) {
|
||||
$value = array_values($value);
|
||||
return '(' . implode(', ', array_map(array($this, 'sanitize'), $value)) . ')';
|
||||
} else {
|
||||
return $this->nonSQLError("Expected array parameter, got something different!");
|
||||
@@ -543,7 +544,7 @@ class MeekroDB {
|
||||
return $this->nonSQLError("Expected double array parameter, got something different!");
|
||||
}
|
||||
} else if ($type == 'hash') {
|
||||
if (is_array($value) && array_values($value) !== $value) {
|
||||
if (is_array($value)) {
|
||||
$pairs = array();
|
||||
foreach ($value as $k => $v) {
|
||||
$pairs[] = $this->formatTableName($k) . '=' . $this->sanitize($v);
|
||||
|
||||
Reference in New Issue
Block a user