diff options
author | Preston Cody <codeman@gentoo.org> | 2008-01-11 03:18:00 +0000 |
---|---|---|
committer | Preston Cody <codeman@gentoo.org> | 2008-01-11 03:18:00 +0000 |
commit | 52fb130639240dcdfee8ab6e0200739156accc2b (patch) | |
tree | d2e12bc6fb098db9d64290bc5028de238f82728f /scire | |
parent | adding recurring_jobs_clients to hold the information for recurring jobs. (diff) | |
download | scire-52fb130639240dcdfee8ab6e0200739156accc2b.tar.gz scire-52fb130639240dcdfee8ab6e0200739156accc2b.tar.bz2 scire-52fb130639240dcdfee8ab6e0200739156accc2b.zip |
wrap tags in if(tags) incase of no tags.
svn path=/trunk/; revision=346
Diffstat (limited to 'scire')
-rwxr-xr-x | scire/.lib/DB_functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scire/.lib/DB_functions.php b/scire/.lib/DB_functions.php index b6b63ab..1278552 100755 --- a/scire/.lib/DB_functions.php +++ b/scire/.lib/DB_functions.php @@ -513,10 +513,12 @@ function scire_add_script($name, $desc, $location, $script_data, $log_location, } #Now add the tags. - foreach ($script_tags as $name => $value) { - $result = $db->insert('dyn_tags', array('scriptid' => $scriptid, 'tag' => $name, 'tag_value' => $value) ); - if (!$result) { - return $db->error; + if ($script_tags) { + foreach ($script_tags as $name => $value) { + $result = $db->insert('dyn_tags', array('scriptid' => $scriptid, 'tag' => $name, 'tag_value' => $value) ); + if (!$result) { + return $db->error; + } } } |