Skip to content
Snippets Groups Projects
Commit 38a8d04f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #158440 by AjK: fixed E_NOTICEs.

parent 6ec2ff7e
No related branches found
No related tags found
No related merge requests found
......@@ -1031,11 +1031,12 @@ function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
*/
function taxonomy_get_synonyms($tid) {
if ($tid) {
$synonyms = array();
$result = db_query('SELECT name FROM {term_synonym} WHERE tid = %d', $tid);
while ($synonym = db_fetch_array($result)) {
$synonyms[] = $synonym['name'];
}
return $synonyms ? $synonyms : array();
return $synonyms;
}
else {
return array();
......@@ -1443,7 +1444,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
* Page to edit a vocabulary.
*/
function taxonomy_admin_vocabulary_edit($vocabulary) {
if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || isset($_POST['confirm'])) {
return drupal_get_form('taxonomy_vocabulary_confirm_delete', $vocabulary->vid);
}
return drupal_get_form('taxonomy_form_vocabulary', (array)$vocabulary);
......@@ -1453,7 +1454,7 @@ function taxonomy_admin_vocabulary_edit($vocabulary) {
* Page to edit a vocabulary term.
*/
function taxonomy_admin_term_edit($tid) {
if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
if ((isset($_POST['op']) && $_POST['op']) == t('Delete') || isset($_POST['confirm'])) {
return drupal_get_form('taxonomy_term_confirm_delete', $tid);
}
if ($term = (array)taxonomy_get_term($tid)) {
......@@ -1567,4 +1568,4 @@ function taxonomy_hook_info() {
),
),
);
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment