@@ -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];
|
||||
|
||||
@@ -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@')) {
|
||||
|
||||
Reference in New Issue
Block a user