[drupal-devel] [bug] Remove PHP notices

killes drupal-devel at drupal.org
Fri May 20 14:43:44 UTC 2005


Issue status update for http://drupal.org/node/16303

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     bug reports
 Priority:     normal
 Assigned to:  killes at www.drop.org
 Reported by:  killes at www.drop.org
 Updated by:   killes at www.drop.org
 Status:       patch
 Attachment:   http://drupal.org/files/issues/warning.patch (2.45 KB)

Ok, here is a smaller patch which gets rid of a large number of notices.




killes at www.drop.org



Previous comments:
------------------------------------------------------------------------

January 27, 2005 - 19:09 : killes at www.drop.org

Attachment: http://drupal.org/files/issues/tablesort-notices.patch (3.42 KB)

Drupal emits an annoying number of PHP notices. The attached patch fixes
a few of them in tablesort.inc.




------------------------------------------------------------------------

January 27, 2005 - 19:56 : Uwe Hermann

The patch looks broken, there's Email-Headers included (probably
erroneously cut'n'pasted there?)...




------------------------------------------------------------------------

January 27, 2005 - 19:58 : killes at www.drop.org

Attachment: http://drupal.org/files/issues/tablesort-notices_0.patch (3.16 KB)

Oops, thanks.




------------------------------------------------------------------------

January 31, 2005 - 23:37 : Dries

Committed to HEAD.




------------------------------------------------------------------------

February 6, 2005 - 14:16 : killes at www.drop.org

Here is another one for user.module. I unified the return value for
user_load and user_external_load to both return an otherwise empty user
object with uid = 0.




------------------------------------------------------------------------

February 6, 2005 - 14:16 : killes at www.drop.org

Attachment: http://drupal.org/files/issues/user-notices.patch (8.18 KB)

and the patch...




------------------------------------------------------------------------

February 6, 2005 - 14:59 : Dries

It doesn't exactly make the code easier to read ...




------------------------------------------------------------------------

February 6, 2005 - 15:11 : killes at www.drop.org

Which parts? Maybe you can apply the chunks you like and leave the
others for a second try.




------------------------------------------------------------------------

February 21, 2005 - 15:13 : budda

When caching is turned on, PHP Notice is generated in the
drupal_set_message() function.


The Return line needs to be amended to consider the fact that there
might not be an array index available.


return isset($_SESSION['messages']) ?  $_SESSION['messages'] : NULL;




------------------------------------------------------------------------

February 21, 2005 - 15:31 : killes at www.drop.org

The patch against user.module is still valid.


We should have general guidelines about whether to care for notices or
not.







More information about the drupal-devel mailing list