Plugin Directory

jetpack

Opened 13 years ago

Closed 13 years ago

#1717 closed defect (fixed)

Fix PHP warnings non-static method called dynamically

Reported by: deanmarktaylor's profile deanmarktaylor's profile DeanMarkTaylor Owned by: tmoorewp's profile tmoorewp's profile tmoorewp
Priority: normal Severity: normal
Plugin: jetpack Keywords: php, logs, strict, e_strict, warning, static
Cc:

Description

Several methods are not declared as static when they should be.

Example of content in PHP log:

(E_STRICT): Non-static method Jetpack_Notifications::init() should not be called statically

This is just noise in logs and can easily be avoided so more important issues can be spotted.

Attachments (1)

0001-Fixed-several-Non-static-method-should-not-be-called-dynamically.patch (5.6 KB) - added by DeanMarkTaylor 13 years ago.
Fixes logged PHP warnings and corrects several other static functions

Download all attachments as: .zip

Change History (4)

@DeanMarkTaylor
13 years ago

Fixes logged PHP warnings and corrects several other static functions

#1 @DeanMarkTaylor
13 years ago

The attached patch tries to keep the changes to a minimum and inline with existing "public" and "static" declarations inside each individual class.
The classes don't seem to conform to a single standard for this.

#3 @jeherve
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [716650]

Note: See TracTickets for help on using tickets.