Minahito
minah****@users*****
2006年 4月 11日 (火) 18:54:49 JST
Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.13 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.14 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.13 Tue Apr 11 18:14:58 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Tue Apr 11 18:54:49 2006 @@ -275,29 +275,37 @@ // $name = $criteria->getName(); $value = $criteria->getValue(); - switch ($obj->mVars[$name]['data_type']) { - case XOBJ_DTYPE_BOOL: - $value = $value ? "1" : "0"; - break; - - case XOBJ_DTYPE_INT: - $value = intval($value); - break; - - case XOBJ_DTYPE_FLOAT: - $value = floatval($value); - break; - - case XOBJ_DTYPE_STRING: - case XOBJ_DTYPE_TEXT: - $value = $this->db->quoteString($value); - break; + if ($name != null && isset($obj->mVars[$name])) { + switch ($obj->mVars[$name]['data_type']) { + case XOBJ_DTYPE_BOOL: + $value = $value ? "1" : "0"; + break; - default: - $value = $criteria->getValue(); + case XOBJ_DTYPE_INT: + $value = intval($value); + break; + + case XOBJ_DTYPE_FLOAT: + $value = floatval($value); + break; + + case XOBJ_DTYPE_STRING: + case XOBJ_DTYPE_TEXT: + $value = $this->db->quoteString($value); + break; + + default: + $value = $criteria->getValue(); + } + } + + if ($name != null) { + return $name . " " . $criteria->getOperator() . " " . $value; + } + else { + return null; } - $string = $name . " " . $criteria->getOperator() . " " . $value; return $string; } }