Project

General

Profile

« Previous | Next » 

Revision 8bf2e9e5

Added by Ermal LUÇI about 14 years ago

Test for null names passed to these functions as a safety precaution.

View differences:

etc/inc/service-utils.inc
114 114
	global $config;
115 115
	global $rcfileprefix;
116 116

  
117
	if (empty($name))
118
		return;
119

  
117 120
	if ($config['installedpackages']['service']) {
118 121
		foreach($config['installedpackages']['service'] as $service) {
119 122
			if(strtolower($service['name']) == strtolower($name)) {
......
147 150
function restart_service($name) {
148 151
	global $config;
149 152

  
153
	if (empty($name))
154
		return;
155

  
150 156
	stop_service($name);
151 157
	start_service($name);
152 158

  

Also available in: Unified diff