• As a plugin developer, I’m always using WP_DEBUG = true. This shows notices for P2 having PHP4 style class constructors (mostly in widgets). I’m using the latest version of the theme. Could this be fixed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi there. Are you able to provide a specific file and line number where you’re seeing an older-style constructor being used? The theme was updated to use the __construct format as of v. 1.5.7, so if we missed some it’d be helpful to know where, if you don’t mind. Thanks!

    Thread Starter Laurens Offereins

    (@offereins)

    Ha, I stand corrected, it’s not in widgets but in other basic functional classes. Here is the complete list of notices (running version 1.5.8):

    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2 has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\functions.php on line 13
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_Terms_In_Comments has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\terms-in-comments.php on line 9
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_Mentions has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\mentions.php on line 16
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_Search has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\search.php on line 9
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_Post_List_Creator has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\list-creator.php on line 37
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_Comment_List_Creator has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\list-creator.php on line 181
    
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; P2_List_Creator has a deprecated constructor in C:\xampp\htdocs\dev\wordpress-develop\src\wp-content\themes\p2\inc\list-creator.php on line 347
    
    

    Thank you for looking into this!

    Moderator Kathryn Presner

    (@zoonini)

    Thanks for that! I’ll pass it on to our developers.

    Hello, Katryn. Any news?

    Hi there – I don’t have any news, Xprmnt. P2 is in maintenance mode so it’s not something we’re actively working on, although I did log the bug.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Notice PHP4 style class constructors’ is closed to new replies.