PHP E_ALL warnings (with code fix)
brmassa - October 7, 2008 - 19:27
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | other |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Gabor,
using D6.x (which prints all PHP E_ALL notices), some unwanted warnings are displayed:
* Fieldset without '#attributes' predefined. Its fixed by replacing the line 1515 on includes/form.inc
<?php
return '<fieldset'. (!empty($element['#attributes']) ? drupal_attributes($element['#attributes']) : '') .'>'. ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') ."</fieldset>\n";
?>* Taxonomy terms, when created/edited, call taxonomy_term_path() and was supposed to give an OBJECT $term, but sometimes its just the term ID.
Its fixed by replacing the line 100 on modules/taxonomy.module (well... it fixes the taxonomy_term_path() function instead fixing the calling)
<?php
if (is_object($term)) {
$vocabulary = taxonomy_vocabulary_load($term->vid);
if ($vocabulary->module != 'taxonomy' && $path = module_invoke($vocabulary->module, 'term_path', $term)) {
return $path;
}
return 'taxonomy/term/'. $term->tid;
}
return 'taxonomy/term/'. $term;
?>Sorry for not providing the patch file.
regards,
massa

#1
#2
There is no patch.
#3
Gabor,
another place where E_ALL warning pop up. This patch will fix. See
includes/xmlrpc.inc, line 70<?phpif (!empty($xmlrpc_value->data->is_date)) {
return 'date';
}
if (!empty($xmlrpc_value->data->is_base64)) {
?>
regards,
massa