mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix handling of empty string arguments in write queries
This commit is contained in:
parent
5dc1eb0762
commit
5496180b47
2 changed files with 19 additions and 2 deletions
|
|
@ -344,6 +344,7 @@ class DB
|
|||
{
|
||||
$output = $this->setError(-1, $e->getMessage());
|
||||
$output->add('_query', $query_string);
|
||||
$output->add('_args', $query_params);
|
||||
$output->add('_elapsed_time', '0.00000');
|
||||
$output->page_navigation = new \PageHandler(0, 0, 0);
|
||||
$this->_query_id = '';
|
||||
|
|
|
|||
|
|
@ -50,7 +50,15 @@ class VariableBase
|
|||
elseif ($args[$this->var] === '')
|
||||
{
|
||||
$this->filterValue($args[$this->var]);
|
||||
list($is_expression, $value) = $this->getDefaultValue();
|
||||
if ($this instanceof ColumnWrite)
|
||||
{
|
||||
$value = $args[$this->var];
|
||||
$is_expression = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
list($is_expression, $value) = $this->getDefaultValue();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -281,7 +289,15 @@ class VariableBase
|
|||
{
|
||||
if ($args[$this->var] === '')
|
||||
{
|
||||
list($is_expression, $value) = $this->getDefaultValue();
|
||||
if ($this instanceof ColumnWrite)
|
||||
{
|
||||
$value = $args[$this->var];
|
||||
$is_expression = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
list($is_expression, $value) = $this->getDefaultValue();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue