WordPress.org

Plugin Directory

jetpack

Opened 4 years ago

Closed 4 years ago

#1717 closed defect (fixed)

Fix PHP warnings non-static method called dynamically

Reported by: DeanMarkTaylor Owned by: 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 4 years ago.
Fixes logged PHP warnings and corrects several other static functions

Download all attachments as: .zip

Change History (4)

@DeanMarkTaylor4 years ago

Fixes logged PHP warnings and corrects several other static functions

comment:1 @DeanMarkTaylor4 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.

comment:3 @jeherve4 years ago

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

Fixed in [716650]

Note: See TracTickets for help on using tickets.