尼玛,写反了。。。
This commit is contained in:
joyqi
2013-12-21 09:58:26 +08:00
parent a4c4213ac8
commit ee73a638ba
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -110,7 +110,8 @@ class Typecho_Validate
// Cycle through the rules and test for errors
foreach ($rules as $key => $rules) {
$this->_key = $key;
$data[$key] = (0 == strlen($data[$key])) ? NULL : $data[$key];
$data[$key] = (is_array($data[$key]) ? 0 == count($data[$key])
: 0 == strlen($data[$key])) ? NULL : $data[$key];
foreach ($rules as $params) {
$method = $params[0];
+1 -1
View File
@@ -148,7 +148,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I
}
$settings = $this->request->from('title', 'siteUrl', 'description', 'keywords', 'allowRegister', 'timezone', 'attachmentTypes');
$settings['siteUrl'] = rtrim('/', $settings['siteUrl']);
$settings['siteUrl'] = rtrim($settings['siteUrl'], '/');
$attachmentTypes = array();
if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@image@')) {