Skip to content
Snippets Groups Projects
Commit fb8e820c authored by Andreas Gohr's avatar Andreas Gohr Committed by GitHub
Browse files

Merge pull request #2075 from splitbrain/allowEmptyStringNumericOpt

bugfix: empty string is valid for numericopt
parents 594b1626 55a4f137
No related branches found
No related tags found
No related merge requests found
......@@ -982,6 +982,22 @@ if (!class_exists('setting_numericopt')) {
class setting_numericopt extends setting_numeric {
// just allow an empty config
var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/';
/**
* Empty string is valid for numericopt
*
* @param mixed $input
*
* @return bool
*/
function update($input) {
if ($input === '') {
return true;
}
return parent::update($input);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment