"MDL-17391, fix file_type_to_ext to class, which should return array all the time"

This commit is contained in:
dongsheng
2008-12-09 06:52:27 +00:00
parent 22ed92de16
commit b933b378e3
+2 -2
View File
@@ -2088,8 +2088,8 @@ class file_type_to_ext {
public function get_file_ext($types) {
$this->result = array();
if ((is_array($types) && in_array('*', $types)) ||
$types == '*') {
return '*';
$types == '*' || empty($types)) {
return array('*');
}
foreach ($types as $key=>$value){
if (strpos($value, '.') !== false) {