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

This commit is contained in:
Ermal 2011-05-17 22:08:21 +00:00
parent 098820e224
commit 8bf2e9e539

View File

@ -114,6 +114,9 @@ function stop_service($name) {
global $config;
global $rcfileprefix;
if (empty($name))
return;
if ($config['installedpackages']['service']) {
foreach($config['installedpackages']['service'] as $service) {
if(strtolower($service['name']) == strtolower($name)) {
@ -147,6 +150,9 @@ function stop_service($name) {
function restart_service($name) {
global $config;
if (empty($name))
return;
stop_service($name);
start_service($name);