Jump to content
Latest News: (loading..)

xinn2005

Members
  • Content count

    7
  • Joined

  • Last visited

Profile Information

  • Real Name
    Cindy Na
  • Gender
    Female
  • Location
    United States
  1. xinn2005

    PHP 7

    Dan - I had a quick look at the link above and found that the class constructor format, __construct(), required by PHP7 was not present in almost all classes. I modified my code because my hosting company upgraded the server environment to php7. I would assume that the oscommerce community should be aware of this fix. Again - I truly appreciate your timely help.
  2. xinn2005

    PHP 7

    Thanks for everybody's input. Here are the changes I made and tested successfully. In addition to the messageStack sub class I had to make similar modifications to the child classes defined in boxes.php such as infoBox, contentBox, etc. To be honest I found these classes around the "boxes" a bit confusing and over-complicated but at least they keep my website running at the moment. class tableBox { // class constructor function __construct() {...} // empty constructor function __tableBox($contents, $direct_output = false) { ... } // moved all code from the original constructor to this function } class messageStack extends tableBox { function __construct() { parent::__construct(); // other actions } function output($class) { $contents = parent::tableBlock($output); return $contents; }
  3. xinn2005

    PHP 7

    @@Lioelx Yes that was the correct fix.
  4. xinn2005

    PHP 7

    @dr_lucas Exactly the topic I've been searching for! I did some similar work but it didn't go through. Will take a closer look. Thanks a bunch!
  5. xinn2005

    PHP 7

    @@Dan Cole Thanks for the info Dan! I was actually looking for the PHP7 compatible version. Another way to deal with it is to bypass calls to messageStack within create_account. Will see how these approaches work out. Appreciate your help!
  6. xinn2005

    PHP 7

    I am using v2.3.4. I guess I could replace the "boxes" with div based code but it would not change the hierarchy of the classes that caused the error.
  7. xinn2005

    PHP 7

    I just upgraded the PHP version to 7.0 for my website. While most warnings were fixed by replacing the old class constructors with __construct(), there are some pretty serious issues with the child class calling parent class constructors in the original code. For example, includes/classes/message_stack.php extends tableBox and has some code that created the "Call to undefined method" error: class tableBox { // class constructor function __construct($contents, $direct_output = false) { ... } } class messageStack extends tableBox { function __construct() { ... } function output($class) { .............. // the line below throws Call to undefined method error return $this->tableBox($output); } Replacing the line above with parent::__construct() didn't work. I would appreciate it if you could share your thoughts on this.
×