Support » Plugin: Tiled Gallery Carousel Without JetPack » HOW TO FIX “deprecated constructor error” jetpack tiled galleries

  • Hi everybody!

    go to wp-content/plugins/tiled-gallery-carousel-without-jetpack/class.jetpack-user-agent.php RULE 98.

    replace

       //The constructor. Initializes default variables.
       function themePacific_jetpack_User_Agent_Info()
       {
       		if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
           		$this->useragent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
       }
    

    with

       //The constructor. Initializes default variables.
    	public function __construct () {
    		if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
           		$this->useragent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
    	}
    

    Original code is to old for PHP > 7

    Didn’t know jetpack was user agent sniffing… bad practice! meh.

    The page I need help with: [log in to see the link]

  • The topic ‘HOW TO FIX “deprecated constructor error” jetpack tiled galleries’ is closed to new replies.