• Hi there,

    I believe the code needs a refresh in order to work smoothly with latest versions of PHP. See error below on PHP 7.

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; JQueryColorboxFrontend has a deprecated constructor in /[...]/wp-content/plugins/jquery-colorbox/includes/jquery-colorbox-frontend.php on line 11

    I’d be happy to provide a pull request if the project was hosted on GitHub.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you find a resolution for this?

    Thread Starter Marco Chiesi

    (@marcochiesi)

    The solution would be quite simple. It’s sufficient to change the name of the constructors from having the same name of the class to the newest PHP standard __construct(...).

    I.e.

    From:
    function JQueryColorboxFrontend($colorboxSettings) {

    To:
    function __construct($colorboxSettings) {

    This needs to be done for all classes.

    Same goes for JQueryColorboxFrontend.

    Will this be updated in the plugin? I’ve got the current version and am seeing the error on my website.

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; JQueryColorboxFrontend has a deprecated constructor in /home/…/public_html/wp-content/plugins/jquery-colorbox/includes/jquery-colorbox-frontend.php on line 11

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deprecated constructor’ is closed to new replies.