• Resolved almendron

    (@almendron)


    Server: local
    WordPress 6.2
    PHP 8.2.4
    JetPack 12.1

    Errors detected:

    1. Deprecated: Creation of dynamic property Jetpack_React_Page::$jetpack is deprecated in C:\wamp64\www\artehistoria\wp-content\plugins\jetpack_inc\lib\admin-pages\class.jetpack-admin-page.php on line 67
    2. Deprecated: Creation of dynamic property Jetpack_Gallery_Settings::$gallery_types is deprecated in C:\wamp64\www\artehistoria\wp-content\plugins\jetpack\class-jetpack-gallery-settings.php on line 34
    • This topic was modified 3 years, 1 month ago by almendron.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @almendron

    Can you provide more information of where you are specifically seeing/getting this error? If you haven’t, I’d suggest reinstalling Jetpack just in case to make sure you have all the latest files:

    https://jetpack.com/support/reconnecting-reinstalling-jetpack/#reinstalling-jetpack

    Best,

    Thread Starter almendron

    (@almendron)

    1. I have downloaded the latest version of Jetpack and the files are identical to the ones I have on my local server.
    2. I correct the path: C:\wamp64\www\artehistoria\wp-content\plugins\jetpack\_inc\lib\admin-pages\class.jetpack-admin-page.php on line 67
    3. The other path is correct: C:\wamp64\www\artehistoria\wp-content\plugins\jetpack\class-jetpack-gallery-settings.php on line 34

    class.jetpack-admin-page.php on line 67: $this->jetpack = $jetpack;

    public function on_jetpack_loaded( $jetpack ) {
    	$this->jetpack = $jetpack;
    
    	self::$block_page_rendering_for_idc = (
    			Identity_Crisis::validate_sync_error_idc_option() && ! Jetpack_Options::get_option( 'safe_mode_confirmed' )
    		);
    	}

    class-jetpack-gallery-settings.php on line 34: $this->gallery_types = apply_filters( 'jetpack_gallery_types', array( 'default' => __( 'Thumbnail Grid', 'jetpack' ) ) );

    public function admin_init() {
    	/**
    	 * Filter the available gallery types.
    	 *
    	 * @module shortcodes, tiled-gallery
    	 *
    	 * @since 2.5.1
    	 *
    	 * @param array $value Array of the default thumbnail grid gallery type. Default array contains one key, ‘default’.
    	 */
    	this->gallery_types = apply_filters( 'jetpack_gallery_types', array( 'default' => __( 'Thumbnail Grid', 'jetpack' ) ) );
    
    	// Enqueue the media UI only if needed.
    	if ( count( $this->gallery_types ) > 1 ) {
    			add_action( 'wp_enqueue_media', array( $this, 'wp_enqueue_media' ) );
    	add_action( 'print_media_templates', array( $this, 'print_media_templates' ) );
    		}
    	// Add Slideshow and Galleries functionality to core's media gallery widget.
    	add_filter( 'widget_media_gallery_instance_schema', array( $this, 'core_media_widget_compat' ) );
    	}

    Usage of dynamic properties. See solutions:

    https://www.php.net/manual/en/migration82.deprecated.php

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Hi @almendron! Thanks a lot for the extra details. We had worked to fix some of those deprecation notices a few months ago when PHP 8.2 was first released, but evidently we had missed a few instances of the problem. We’ll work on getting rid of those notices with the following patch, that should be included in the next Jetpack release.

    Thank you for letting us know!

    Thread Starter almendron

    (@almendron)

    You are welcome. Best regards.

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

The topic ‘Dynamic property’ is closed to new replies.