On Friday 14 October 2005 10:36 am, Steve Dondley wrote: Hello, I need your feedback on which of two solutions I should use to make Drupal E_STRICT compliant. http://drupal.org/node/28540
else if (isset($result)) {
to this:
else if (isset($result) && $result != '') {
This discussion is relevant to this: http://drupal.org/node/28540 (drupal base and E_NOTICE) An example of the error notice we get is when going to admin/settings: notice: Undefined index: #attributes in includes/form.inc on line 54. notice: Undefined index: class in includes/form.inc on line 54. the line is part of: function drupal_get_form ($form_id, &$form, $callback = NULL) which is called in this case from system.module from function system_view_general() Now I can solve this problem in by declaring the array this way: $form['#attributes']['class'] = array (); I can add this line 1- either within the function drupal_get_form in includes/form.inc 2- or within the function system_view_general in modules/system.module. Which way would be better/correct? Another similar example: notice: Undefined index: #built in includes/form.inc on line 180. should I change in the said line: if ($form['#built'] == TRUE) { to if (isset($form['#built'] AND $form['#built'] == TRUE) { or should I go back to where the function was called from, and declare the array there? By the way, looking at admin/settings, there are over 1480 such errors!!! most of them coming from form.inc. I'm working on updating the already proposed patches, but I need to know which way to go. thank you. -- http://www.wechange.org/ Because we and the world need to change. http://www.reuniting.info/ Intimate Relationships, peace and harmony in the couple. http://www.gnosis-usa.com/ Revolutionary Psychology, White Tantrism, Dream Yoga... http://www.masquilier.org/ Condorcet, Approval alternative, better voting methods.