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

Comments

Uwe Hermann’s picture

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

killes@www.drop.org’s picture

StatusFileSize
new3.16 KB

Oops, thanks.

dries’s picture

Committed to HEAD.

killes@www.drop.org’s picture

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.

killes@www.drop.org’s picture

StatusFileSize
new8.18 KB

and the patch...

dries’s picture

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

killes@www.drop.org’s picture

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

budda’s picture

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;

killes@www.drop.org’s picture

The patch against user.module is still valid.

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

killes@www.drop.org’s picture

StatusFileSize
new2.45 KB

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

dries’s picture

Committed to HEAD. Thanks.

Anonymous’s picture