MDL-15897 fix strict comparison

This commit is contained in:
Petr Skoda
2010-09-02 17:33:49 +00:00
parent b6059edcac
commit 40ea93a4fe
+2 -2
View File
@@ -1622,7 +1622,7 @@ class admin_setting_configtext extends admin_setting {
if (!is_null($size)) {
$this->size = $size;
} else {
$this->size = ($paramtype == PARAM_INT) ? 5 : 30;
$this->size = ($paramtype === PARAM_INT) ? 5 : 30;
}
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
@@ -1668,7 +1668,7 @@ class admin_setting_configtext extends admin_setting {
} else {
$cleaned = clean_param($data, $this->paramtype);
if ("$data" == "$cleaned") { // implicit conversion to string is needed to do exact comparison
if ("$data" === "$cleaned") { // implicit conversion to string is needed to do exact comparison
return true;
} else {
return get_string('validateerror', 'admin');