#77 Class variables not explicitly defined

closed-fixed
5
2004-06-22
2004-06-06
Wouter Demuynck
No

The PHP classes that Nucleus uses do not explicitly
define their class member variables. It's not required,
but this might be causing the problem described on
http://forum.nucleuscms.org/viewtopic.php?t=3846 and
http://sourceforge.net/tracker/index.php?func=detail&aid=963589&group_id=66479&atid=514643

What we have now:

class BLOG {
function BLOG($id) {
$this->blogid = intval($id);
}
}

This is what it should be:

class BLOG {
function BLOG($id) {
$this->blogid = intval($id);
}

// blog id
var $blogid;
}

The explicit declaration also provides us with an
opportunity to add documentation on what contents that
variable will have.

(note: this 'bug' applies to ALL classes, not only to BLOG)

Discussion

    • assigned_to: nobody --> dekarma
     
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=315939

    All classes should now have explicitly defined member variables