Project

General

Profile

« Previous | Next » 

Revision 1407

Added by FrankH almost 14 years ago

  1. various Security fixes, thanks to secunia and others

View differences:

browse.php
49 49
// Get file extension
50 50
function get_filetype($fname) {
51 51
	$pathinfo = pathinfo($fname);
52
	$extension = strtolower($pathinfo['extension']);
52
	$extension = (isset($pathinfo['extension'])) ? strtolower($pathinfo['extension']) : '';
53 53
	return $extension;
54 54
}
55 55

  
56 56
// Get file extension for icons
57 57
function get_filetype_icon($fname) {
58 58
	$pathinfo = pathinfo($fname);
59
	$extension = strtolower($pathinfo['extension']);
59
	$extension = (isset($pathinfo['extension'])) ? strtolower($pathinfo['extension']) : '';
60 60
	if (file_exists(THEME_PATH.'/images/files/'.$extension.'.png')) {
61 61
		return $extension;
62 62
	} else {

Also available in: Unified diff