MDL-31006 fix various notices in PHP54
PHP54 compatibility
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
ae924874d7
commit
b85b25ebb8
@@ -2466,6 +2466,10 @@ class MoodleQuickForm_Rule_Required extends HTML_QuickForm_Rule {
|
||||
if (is_array($value) && array_key_exists('text', $value)) {
|
||||
$value = $value['text'];
|
||||
}
|
||||
if (is_array($value)) {
|
||||
// nasty guess - there has to be something in the array, hopefully nobody invents arrays in arrays
|
||||
$value = implode('', $value);
|
||||
}
|
||||
$stripvalues = array(
|
||||
'#</?(?!img|canvas|hr).*?>#im', // all tags except img, canvas and hr
|
||||
'#(\xc2|\xa0|\s| )#', //any whitespaces actually
|
||||
|
||||
Reference in New Issue
Block a user