Help to correct errors.

strict warning: Non-static method Pagination::getInstance() should not be called statically in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 307.
strict warning: Only variables should be assigned by reference in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 307.
strict warning: Non-static method Pagination::getInstance() should not be called statically in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 402.
strict warning: Only variables should be assigned by reference in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 402.
strict warning: Non-static method Pagination::getInstance() should not be called statically in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 344.
strict warning: Only variables should be assigned by reference in /var/www/nurofen/data/www/gosha.me/sites/all/modules/pagination/pagination.module on line 344.

Comments

mundanity’s picture

Status: Active » Fixed

This should be corrected in the D7 version (coming soon!). The D6 version will always have this (as it supports PHP4 style classes), and has a minimum version of PHP 4.4.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Aldu_boy’s picture

Issue summary: View changes

Can you please advise: I was using this module with PHP5.3 and Drupal 6.34 successfully without error message above and now since I updagraded to Drupal 6.35 and earlier I get it.
what has changed? May be there ir a way to patch it somehow?
P.S. Complete error message display disable is not a solution (and I don't have access to php.ini for that using shared hosting).

Any advises?

Aldu_boy’s picture

Status: Closed (fixed) » Needs review
daveferrara1’s picture

in PHP 5.5 - Look into using - public static function - for the function getInstance() inside the class Pagination

/**
   *  @desc   Static call to return a single instance
   *  @return object  Pagination
   *  @static
   */
  public static function getInstance()  {
    $pagination = array();
    if (empty($pagination) )  {
      $pagination['instance'] = new Pagination();
    }
    return $pagination['instance'];
  }

you also need to make all

- $pg  =& Pagination::getInstance(); 
+ $pg  = Pagination::getInstance();