[drupal-devel] [bug] Fix for PHP5 notices: undefined vars, etc...

m3avrck drupal-devel at drupal.org
Sun Sep 11 18:35:36 UTC 2005


Issue status update for 
http://drupal.org/node/30930
Post a follow up: 
http://drupal.org/project/comments/add/30930

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     bug reports
 Priority:     normal
 Assigned to:  m3avrck
 Reported by:  m3avrck
 Updated by:   m3avrck
-Status:       active
+Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/drupal_10.patch (20.18 KB)

Ok guys here is Phase1 of the PHP5 megapatch. This fixes roughly 60-70%
of all the warnings/notices/etc present with PHP5 error_reportin(E_ALL)
in place.


Please look over comment and let's get this into HEAD ASAP! I *do not*
want to reroll this patch if it gets out of date :) I've also tried not
to patch certain core modules waiting on bigger patches (e.g., filter
module). So please, comment now and let's get this in right now :)


I'll continue to provide additionally phases of this patch till we can
get all issues cleared up. Thanks!




m3avrck



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

Sun, 11 Sep 2005 15:11:48 +0000 : m3avrck

Ok guys I'm currently working on a patch that erradicates all of the
PHP5 notices and warnings from the main Drupal core. Expect to see a
patch soon, the PHP5 mega patch, that is ;)




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

Sun, 11 Sep 2005 15:13:45 +0000 : m3avrck

This patch incorporates this patch: http://drupal.org/node/28948


And addresses the issues brought up with this patch:
http://drupal.org/node/30784


A 4.6.3 version can be found here: http://drupal.org/node/30800




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

Sun, 11 Sep 2005 15:21:13 +0000 : m3avrck

This patch also fixes this bug (as discovered through an undefined
variable): http://drupal.org/node/30807


"
m3avrck	hey anyone familiar with node_access_view_all_nodes() ... i
think i found a bug as i'm going through cleaning up undefined
variables


drumm	m3avrck: I think jonbob, but he is still gone


m3avrck	yeah definetly a bug


m3avrck	yeah drumm just created this issue:
http://drupal.org/node/30807


drumm	I'm guessing $node->nid can simply be taken out. I'm not sure a
%d or %s will ever make it's way into $sql


chx	drumm: re. that node access problem and node->nid , it's a minor
bug -- the query has no arguments thus needs no arguments.


chx	it's not drumm it's m3avrck


chx	m3avrck: so, roll a patch which removes that $node->nid


m3avrck	ok thanks chx


chx	I think the argument was removed during the fix of the so-called
DrupalCon bug :) which moshe pointed out to me and JonBob and me have
fixed on site. Real life debugging with those guys were real fun!


chx	I am not totally sure though -- but it was related to this function
for sure


"


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

Sun, 11 Sep 2005 16:13:59 +0000 : m3avrck

This patch also fixes a somewhat incorrect use of PHP getimagesize() :
http://us2.php.net/manual/en/function.getimagesize.php ... none of the
$attr from list() = getimagesize() are ever used (couldn't find a
example when these ever would be used), hence they are always
undefined. Additionally, we don't even make use of the $width and
$height vars that we define already, this is fixed in this patch as
well.




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

Sun, 11 Sep 2005 16:23:17 +0000 : m3avrck

Looks like that getimagesize() is outside the scope of this patch now,
created a seperate issue with patch (coming soon!):
http://drupal.org/node/30935







More information about the drupal-devel mailing list