please add

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

to your settings.php to show all these PHP warnings (if your server is not already configured to do so) and test a bit around.

Comments

wim leers’s picture

Title: php undefined variable notices » PHP undefined variable notices
Category: bug » task
Priority: Normal » Minor

Configuring settings.php is not sufficient apparently (I had done that a long time ago already and had given up because I didn't get to see any notices).

You must also patch Drupal core: it won't show E_NOTICE errors out-of-the-box. Stupid!

I'll review your patch ASAP :)

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Fixed
StatusFileSize
new17.75 KB

I fixed all notices that I could find/produce. I'm sure there are more, although most notices should be fixed now. I've based my patch on your changes, but changed some of your modifications and added many, many more fixes.

http://drupal.org/cvs?commit=281808

wim leers’s picture

Oh and the changes to core that are necessary: in common.inc, change:
if ($errno & (E_ALL ^ E_NOTICE ^ E_DEPRECATED)) {
to:
if ($errno & (E_ALL ^ E_NOTICE | error_reporting())) {

wim leers’s picture

Status: Fixed » Needs work

Dammit, this patch consists of very simple changes and therefor I went ahead and committed it. But apparently this broke HS.

wim leers’s picture

Status: Needs work » Fixed

Fixed again: http://drupal.org/cvs?commit=281956. Also fixed another notice at the same time.

jrao’s picture

Status: Fixed » Needs work

This fix introduced an error in hs_taxonomy.module:

@@ -135,14 +135,14 @@ function hs_taxonomy_form_taxonomy_form_
       'status'   => 1,
     ),
     'params' => array(
-      'vid'         => $form['vid']['#value'],
-      'exclude_tid' => $form['tid']['#value'],
+      'vid'         => isset($form['tid']['#value']) ? $form['vid']['#value'] : NULL,
+      'exclude_tid' => isset($form['tid']['#value']) ? $form['tid']['#value'] : NULL,
       'root_term'   => TRUE,
     ),
   );

I think you meant to use:

'vid'         => isset($form['vid']['#value']) ? $form['vid']['#value'] : NULL,

Otherwise the parent and related terms in new terms form will always be empty.

wim leers’s picture

Status: Needs work » Reviewed & tested by the community

Good find. Thanks! Will commit ASAP.

wim leers’s picture

Status: Reviewed & tested by the community » Fixed

jrao, sorry for not committing your fix right away. This was solved in #640418: Unable to select parent terms on add term form though, many weeks ago. I hope you saw this was "suddenly" fixed :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.