Merge branch 'MDL-39474-master' of git://github.com/sammarshallou/moodle
This commit is contained in:
Vendored
+2
-1
@@ -518,8 +518,9 @@ class cache_helper {
|
||||
* @return string
|
||||
*/
|
||||
public static function hash_key($key, cache_definition $definition) {
|
||||
global $CFG;
|
||||
if ($definition->uses_simple_keys()) {
|
||||
if (debugging() && preg_match('#[^a-zA-Z0-9_]#', $key)) {
|
||||
if ($CFG->developerdebug && preg_match('#[^a-zA-Z0-9_]#', $key)) {
|
||||
throw new coding_exception('Cache definition '.$definition->get_id().' requires simple keys. Invalid key provided.', $key);
|
||||
}
|
||||
// We put the key first so that we can be sure the start of the key changes.
|
||||
|
||||
Reference in New Issue
Block a user