--- includes/file.inc +++ includes/file.inc @@ -682,7 +682,7 @@ function file_validate_extensions($file, $extensions) { // Bypass validation for uid = 1. if ($user->uid != 1) { - $regex = '/\.('. ereg_replace(' +', '|', preg_quote($extensions)) .')$/i'; + $regex = '/\.('. @ereg_replace(' +', '|', preg_quote($extensions)) .')$/i'; if (!preg_match($regex, $file->filename)) { $errors[] = t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => $extensions)); } @@ -959,7 +959,7 @@ function file_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $ca // Give priority to files in this folder by merging them in after any subdirectory files. $files = array_merge(file_scan_directory("$dir/$file", $mask, $nomask, $callback, $recurse, $key, $min_depth, $depth + 1), $files); } - elseif ($depth >= $min_depth && ereg($mask, $file)) { + elseif ($depth >= $min_depth && @ereg($mask, $file)) { // Always use this match over anything already set in $files with the same $$key. $filename = "$dir/$file"; $basename = basename($file); --- includes/unicode.inc +++ includes/unicode.inc @@ -134,7 +134,7 @@ function drupal_xml_parser_create(&$data) { } // Check for an encoding declaration in the XML prolog if no BOM was found. - if (!$bom && ereg('^<\?xml[^>]+encoding="([^"]+)"', $data, $match)) { + if (!$bom && @ereg('^<\?xml[^>]+encoding="([^"]+)"', $data, $match)) { $encoding = $match[1]; } @@ -144,7 +144,7 @@ function drupal_xml_parser_create(&$data) { $out = drupal_convert_to_utf8($data, $encoding); if ($out !== FALSE) { $encoding = 'utf-8'; - $data = ereg_replace('^(<\?xml[^>]+encoding)="([^"]+)"', '\\1="utf-8"', $out); + $data = @ereg_replace('^(<\?xml[^>]+encoding)="([^"]+)"', '\\1="utf-8"', $out); } else { watchdog('php', 'Could not convert XML encoding %s to UTF-8.', array('%s' => $encoding), WATCHDOG_WARNING);