Title: PHP7 deprecation warning
Last modified: September 1, 2016

---

# PHP7 deprecation warning

 *  Resolved [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-deprecation-warning/)
 * Hi Paul,
    Thanks for your plugin. Just wanted to inform you that with php7 you
   get a deprecation warning, which can very easily be fixed. On line 40 in insert-
   pages.php you have a constructor with the same name as the class (InsertPagesPlugin).
   This is deprecated and constructors should be named “__construct”. To fix this
   I have just duplicated the InsertPagesPlugin function and called it __construct
   Cheers — christer
 * [https://wordpress.org/plugins/insert-pages/](https://wordpress.org/plugins/insert-pages/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-deprecation-warning/#post-7609973)
 * Thanks for catching that! I’ll get your fix included in the next release.
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-deprecation-warning/#post-7609974)
 * In fact I noticed that it’s better to rename the function to __construct rather
   than duplicating. Then it works fine both with PHP 5.x and 7.0
 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-deprecation-warning/#post-7610092)
 * Version 3.1.6 is out with the following fix:
    [https://github.com/uhm-coe/insert-pages/commit/459b02287f5bd09a6dfd4289b0a68b5d0a8fa0ae](https://github.com/uhm-coe/insert-pages/commit/459b02287f5bd09a6dfd4289b0a68b5d0a8fa0ae)
 * Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP7 deprecation warning’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/insert-pages.svg)
 * [Insert Pages](https://wordpress.org/plugins/insert-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-pages/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/php7-deprecation-warning/#post-7610092)
 * Status: resolved