Skip to content

Commit

Permalink
Fix deprecated notice about non-static function
Browse files Browse the repository at this point in the history
set_request_last_from_entries() is being called statically when the function isn't declared static, resulting in this error:

> Deprecated: Non-static method WPCOM_Liveblog_AMP::set_request_last_from_entries() should not be called statically in /liveblog/classes/class-wpcom-liveblog-amp.php on line 259

This change fixes that by declaring the function as static.
  • Loading branch information
philipjohn committed Jun 7, 2018
1 parent 8c3499a commit b623142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/class-wpcom-liveblog-amp.php
Expand Up @@ -270,7 +270,7 @@ public static function append_liveblog_to_content( $content ) {
* @param array $entries liveblog entries.
* @param object $request Request Object.
*/
public function set_request_last_from_entries( $entries, $request ) {
public static function set_request_last_from_entries( $entries, $request ) {
if ( false === $request->last ) {
$request->last = $entries['entries'][0]->id . '-' . $entries['entries'][0]->timestamp;
}
Expand Down

0 comments on commit b623142

Please sign in to comment.