-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
3.1.5
-
MOODLE_31_STABLE
-
git@github.com:jojoob/moodle.git
-
master-
MDL-58243 -
It is not possible for neither data field in a database activity module to search for the string or integer zero. The mod_data implementation of handling search parameters is using the empty() function to determine if a parameter is set. For the empty() function returns true also for the integer 0 and the string '0' mod_data will discard this values.
Reproduce the behaviour:
- Create a database activity module instance
- create at least one field of type text or number
- create at least one test entry with the value 0
- use the search to try find the test entry
- EXPECTED: find only the searched entry when searching for 0 ACTUALLY: the search parameter is ignored and all entries are shown
A patch is attached.
- has a clone
-
MDL-84915 Not possible to search for '0' in database activity module
-
- Open
-