Project

General

Profile

« Previous | Next » 

Revision 4e4de1d1

Added by Ermal LUÇI over 14 years ago

  • ID 4e4de1d1af14cd8849418ca46c144966a8129a4c
  • Child 24fa000b

Resolves #1529. Check if the file exists before opening it.

View differences:

etc/inc/pfsense-utils.inc
2191 2191
 ******/
2192 2192
function load_mac_manufacturer_table() {
2193 2193
	/* load MAC-Manufacture data from the file */
2194
	$macs=file("/usr/local/share/nmap/nmap-mac-prefixes");
2194
	$macs = false;
2195
	if (file_exists("/usr/local/share/nmap/nmap-mac-prefixes"))
2196
		$macs=file("/usr/local/share/nmap/nmap-mac-prefixes");
2195 2197
	if ($macs){
2196 2198
		foreach ($macs as $line){
2197 2199
			if (preg_match('/([0-9A-Fa-f]{6}) (.*)$/', $line, $matches)){

Also available in: Unified diff